Skip to content

A free open source IT asset/license management system

Formatting

Marcus Moorea9f7d42d7750
diff --git a/tests/Feature/Assets/Api/AuditAssetTest.php b/tests/Feature/Assets/Api/AuditAssetTest.php
index dae4900340..df4572ab20 100644
--- a/tests/Feature/Assets/Api/AuditAssetTest.php
+++ b/tests/Feature/Assets/Api/AuditAssetTest.php
@@ -10,21 +10,21 @@ use Tests\TestCase;
#[Group('auditing')]
class AuditAssetTest extends TestCase
{
- public function testPermissionRequiredToBulkAuditAssets()
+ public function test_permission_required_to_bulk_audit_assets()
{
$this->actingAsForApi(User::factory()->create())
->postJson(route('api.asset.audit', Asset::factory()->create()))
->assertForbidden();
}
- public function testThatANonExistentAssetIdReturnsError()
+ public function test_that_a_non_existent_asset_id_returns_error()
{
$this->actingAsForApi(User::factory()->auditAssets()->create())
->postJson(route('api.asset.audit', 123456789))
->assertStatusMessageIs('error');
}
- public function testRequiresPermissionToAuditAsset()
+ public function test_requires_permission_to_audit_asset()
{
$asset = Asset::factory()->create();
$this->actingAsForApi(User::factory()->create())
@@ -32,7 +32,7 @@ class AuditAssetTest extends TestCase
->assertForbidden();
}
- public function testLegacyAssetAuditIsSaved()
+ public function test_legacy_asset_audit_is_saved()
{
$asset = Asset::factory()->create();
$future = now()->addMonths(5)->toDateString();
@@ -46,11 +46,11 @@ class AuditAssetTest extends TestCase
->assertStatusMessageIs('success')
->assertJson(
[
- 'messages' =>trans('admin/hardware/message.audit.success'),
+ 'messages' => trans('admin/hardware/message.audit.success'),
'payload' => [
'id' => $asset->id,
'asset_tag' => $asset->asset_tag,
- 'note' => 'test'
+ 'note' => 'test',
],
])
->assertStatus(200);
@@ -62,7 +62,7 @@ class AuditAssetTest extends TestCase
/**
* @link https://github.com/grokability/snipe-it/issues/18495
*/
- public function testAuditDoesNotSetNextAuditDateIfGivenNull()
+ public function test_audit_does_not_set_next_audit_date_if_given_null()
{
$this->settings->setAuditInterval(null);
@@ -82,21 +82,21 @@ class AuditAssetTest extends TestCase
$this->assertNull($asset->next_audit_date);
}
- public function testAssetAuditIsSaved()
+ public function test_asset_audit_is_saved()
{
$asset = Asset::factory()->create();
$this->actingAsForApi(User::factory()->auditAssets()->create())
->postJson(route('api.asset.audit', $asset), [
- 'note' => 'test'
+ 'note' => 'test',
])
->assertStatusMessageIs('success')
->assertJson(
[
- 'messages' =>trans('admin/hardware/message.audit.success'),
+ 'messages' => trans('admin/hardware/message.audit.success'),
'payload' => [
'id' => $asset->id,
'asset_tag' => $asset->asset_tag,
- 'note' => 'test'
+ 'note' => 'test',
],
])
->assertStatus(200);
diff --git a/tests/Feature/Assets/Ui/AuditAssetTest.php b/tests/Feature/Assets/Ui/AuditAssetTest.php
index 2146dba82c..af63a9ed2f 100644
--- a/tests/Feature/Assets/Ui/AuditAssetTest.php
+++ b/tests/Feature/Assets/Ui/AuditAssetTest.php
@@ -15,7 +15,7 @@ class AuditAssetTest extends TestCase
$this->markTestIncomplete();
}
- public function testPageCanBeAccessed(): void
+ public function test_page_can_be_accessed(): void
{
$this->actingAs(User::factory()->auditAssets()->create())
->get(route('asset.audit.create', Asset::factory()->create()))
@@ -27,7 +27,7 @@ class AuditAssetTest extends TestCase
$this->markTestIncomplete();
}
- public function testAssetAuditPostIsRedirectedToAssetIndexIfRedirectSelectionIsIndex()
+ public function test_asset_audit_post_is_redirected_to_asset_index_if_redirect_selection_is_index()
{
$asset = Asset::factory()->create();
@@ -44,7 +44,7 @@ class AuditAssetTest extends TestCase
$this->assertHasTheseActionLogs($asset, ['create', 'audit']);
}
- public function testAssetAuditPostIsRedirectedToAssetPageIfRedirectSelectionIsAsset()
+ public function test_asset_audit_post_is_redirected_to_asset_page_if_redirect_selection_is_asset()
{
$asset = Asset::factory()->create();
@@ -60,7 +60,7 @@ class AuditAssetTest extends TestCase
$this->assertHasTheseActionLogs($asset, ['create', 'audit']); // WAT.
}
- public function testAssetAuditPostIsRedirectedToAuditDuePageIfRedirectSelectionIsList()
+ public function test_asset_audit_post_is_redirected_to_audit_due_page_if_redirect_selection_is_list()
{
$asset = Asset::factory()->create();
@@ -75,5 +75,4 @@ class AuditAssetTest extends TestCase
$this->followRedirects($response)->assertSee('success');
$this->assertHasTheseActionLogs($asset, ['create', 'audit']);
}
-
}