Skip to content

A free open source IT asset/license management system

Move InteractsWithSettings to TestCase

Marcus Moore8003615b1f1b
diff --git a/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php b/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php
index d65a3ad613..854a96ada2 100644
--- a/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php
+++ b/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php
@@ -7,13 +7,10 @@ use App\Models\Actionlog;
use App\Models\User;
use App\Notifications\CheckoutAccessoryNotification;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AccessoryCheckoutTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCheckingOutAccessoryRequiresCorrectPermission()
{
$this->actingAsForApi(User::factory()->create())
diff --git a/tests/Feature/Api/Assets/AssetCheckinTest.php b/tests/Feature/Api/Assets/AssetCheckinTest.php
index 6f8daf5691..add90a067d 100644
--- a/tests/Feature/Api/Assets/AssetCheckinTest.php
+++ b/tests/Feature/Api/Assets/AssetCheckinTest.php
@@ -11,13 +11,10 @@ use App\Models\Statuslabel;
use App\Models\User;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Event;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetCheckinTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCheckingInAssetRequiresCorrectPermission()
{
$this->actingAsForApi(User::factory()->create())
diff --git a/tests/Feature/Api/Assets/AssetIndexTest.php b/tests/Feature/Api/Assets/AssetIndexTest.php
index 778483c1c9..3175db6953 100644
--- a/tests/Feature/Api/Assets/AssetIndexTest.php
+++ b/tests/Feature/Api/Assets/AssetIndexTest.php
@@ -6,13 +6,10 @@ use App\Models\Asset;
use App\Models\Company;
use App\Models\User;
use Illuminate\Testing\Fluent\AssertableJson;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetIndexTest extends TestCase
{
- use InteractsWithSettings;
-
public function testAssetIndexReturnsExpectedAssets()
{
Asset::factory()->count(3)->create();
diff --git a/tests/Feature/Api/Assets/AssetStoreTest.php b/tests/Feature/Api/Assets/AssetStoreTest.php
index 92a58a5006..ceae053648 100644
--- a/tests/Feature/Api/Assets/AssetStoreTest.php
+++ b/tests/Feature/Api/Assets/AssetStoreTest.php
@@ -9,15 +9,11 @@ use App\Models\Location;
use App\Models\Statuslabel;
use App\Models\Supplier;
use App\Models\User;
-use Carbon\Carbon;
use Illuminate\Testing\Fluent\AssertableJson;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetStoreTest extends TestCase
{
- use InteractsWithSettings;
-
public function testRequiresPermissionToCreateAsset()
{
$this->actingAsForApi(User::factory()->create())
diff --git a/tests/Feature/Api/Assets/AssetsForSelectListTest.php b/tests/Feature/Api/Assets/AssetsForSelectListTest.php
index cccae38d38..3c5e1e4e7c 100644
--- a/tests/Feature/Api/Assets/AssetsForSelectListTest.php
+++ b/tests/Feature/Api/Assets/AssetsForSelectListTest.php
@@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Assets;
use App\Models\Asset;
use App\Models\Company;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetsForSelectListTest extends TestCase
{
- use InteractsWithSettings;
-
public function testAssetsCanBeSearchedForByAssetTag()
{
Asset::factory()->create(['asset_tag' => '0001']);
diff --git a/tests/Feature/Api/Assets/RequestableAssetsTest.php b/tests/Feature/Api/Assets/RequestableAssetsTest.php
index 8649b1b00b..d90e45f223 100644
--- a/tests/Feature/Api/Assets/RequestableAssetsTest.php
+++ b/tests/Feature/Api/Assets/RequestableAssetsTest.php
@@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Assets;
use App\Models\Asset;
use App\Models\Company;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class RequestableAssetsTest extends TestCase
{
- use InteractsWithSettings;
-
public function testViewingRequestableAssetsRequiresCorrectPermission()
{
$this->actingAsForApi(User::factory()->create())
diff --git a/tests/Feature/Api/Components/ComponentIndexTest.php b/tests/Feature/Api/Components/ComponentIndexTest.php
index ee83b7a46d..517724a499 100644
--- a/tests/Feature/Api/Components/ComponentIndexTest.php
+++ b/tests/Feature/Api/Components/ComponentIndexTest.php
@@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Components;
use App\Models\Company;
use App\Models\Component;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class ComponentIndexTest extends TestCase
{
- use InteractsWithSettings;
-
public function testComponentIndexAdheresToCompanyScoping()
{
[$companyA, $companyB] = Company::factory()->count(2)->create();
diff --git a/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php b/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php
index 103be96ac2..1528e65aa3 100644
--- a/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php
+++ b/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php
@@ -7,13 +7,10 @@ use App\Models\Consumable;
use App\Models\User;
use App\Notifications\CheckoutConsumableNotification;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class ConsumableCheckoutTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCheckingOutConsumableRequiresCorrectPermission()
{
$this->actingAsForApi(User::factory()->create())
diff --git a/tests/Feature/Api/Consumables/ConsumablesIndexTest.php b/tests/Feature/Api/Consumables/ConsumablesIndexTest.php
index 33c10ed078..00fa43da27 100644
--- a/tests/Feature/Api/Consumables/ConsumablesIndexTest.php
+++ b/tests/Feature/Api/Consumables/ConsumablesIndexTest.php
@@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Consumables;
use App\Models\Company;
use App\Models\Consumable;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class ConsumablesIndexTest extends TestCase
{
- use InteractsWithSettings;
-
public function testConsumableIndexAdheresToCompanyScoping()
{
[$companyA, $companyB] = Company::factory()->count(2)->create();
diff --git a/tests/Feature/Api/Departments/DepartmentIndexTest.php b/tests/Feature/Api/Departments/DepartmentIndexTest.php
index 1a3884308f..11ab5df9bc 100644
--- a/tests/Feature/Api/Departments/DepartmentIndexTest.php
+++ b/tests/Feature/Api/Departments/DepartmentIndexTest.php
@@ -5,15 +5,11 @@ namespace Tests\Feature\Api\Departments;
use App\Models\Company;
use App\Models\Department;
use App\Models\User;
-use Illuminate\Routing\Route;
use Illuminate\Testing\Fluent\AssertableJson;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class DepartmentIndexTest extends TestCase
{
- use InteractsWithSettings;
-
public function testViewingDepartmentIndexRequiresAuthentication()
{
$this->getJson(route('api.departments.index'))->assertRedirect();
diff --git a/tests/Feature/Api/Groups/GroupStoreTest.php b/tests/Feature/Api/Groups/GroupStoreTest.php
index 9ffba51913..31a69fb469 100644
--- a/tests/Feature/Api/Groups/GroupStoreTest.php
+++ b/tests/Feature/Api/Groups/GroupStoreTest.php
@@ -4,13 +4,10 @@ namespace Tests\Feature\Api\Groups;
use App\Models\Group;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class GroupStoreTest extends TestCase
{
- use InteractsWithSettings;
-
public function testStoringGroupRequiresSuperAdminPermission()
{
$this->actingAsForApi(User::factory()->create())
diff --git a/tests/Feature/Api/Licenses/LicensesIndexTest.php b/tests/Feature/Api/Licenses/LicensesIndexTest.php
index a21a27da73..603002a095 100644
--- a/tests/Feature/Api/Licenses/LicensesIndexTest.php
+++ b/tests/Feature/Api/Licenses/LicensesIndexTest.php
@@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Licenses;
use App\Models\Company;
use App\Models\License;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class LicensesIndexTest extends TestCase
{
- use InteractsWithSettings;
-
public function testLicensesIndexAdheresToCompanyScoping()
{
[$companyA, $companyB] = Company::factory()->count(2)->create();
diff --git a/tests/Feature/Api/Locations/LocationsForSelectListTest.php b/tests/Feature/Api/Locations/LocationsForSelectListTest.php
index 4170cfc7f7..bfc7fc5374 100644
--- a/tests/Feature/Api/Locations/LocationsForSelectListTest.php
+++ b/tests/Feature/Api/Locations/LocationsForSelectListTest.php
@@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Locations;
use App\Models\Location;
use App\Models\User;
use Illuminate\Testing\Fluent\AssertableJson;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class LocationsForSelectListTest extends TestCase
{
- use InteractsWithSettings;
-
public function testGettingLocationListRequiresProperPermission()
{
$this->actingAsForApi(User::factory()->create())
diff --git a/tests/Feature/Api/Users/UpdateUserApiTest.php b/tests/Feature/Api/Users/UpdateUserApiTest.php
index 81c1154648..f58aae4a05 100644
--- a/tests/Feature/Api/Users/UpdateUserApiTest.php
+++ b/tests/Feature/Api/Users/UpdateUserApiTest.php
@@ -3,16 +3,10 @@
namespace Tests\Feature\Api\Users;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
-use Tests\Support\InteractsWithAuthentication;
-
class UpdateUserApiTest extends TestCase
{
- use InteractsWithSettings;
- use InteractsWithAuthentication;
-
public function testApiUsersCanBeActivatedWithNumber()
{
$admin = User::factory()->superuser()->create();
@@ -64,5 +58,4 @@ class UpdateUserApiTest extends TestCase
$this->assertEquals(0, $user->refresh()->activated);
}
-
}
diff --git a/tests/Feature/Api/Users/UsersForSelectListTest.php b/tests/Feature/Api/Users/UsersForSelectListTest.php
index 8cdf700f04..1ebfcf72eb 100644
--- a/tests/Feature/Api/Users/UsersForSelectListTest.php
+++ b/tests/Feature/Api/Users/UsersForSelectListTest.php
@@ -6,13 +6,10 @@ use App\Models\Company;
use App\Models\User;
use Illuminate\Testing\Fluent\AssertableJson;
use Laravel\Passport\Passport;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class UsersForSelectListTest extends TestCase
{
- use InteractsWithSettings;
-
public function testUsersAreReturned()
{
$users = User::factory()->superuser()->count(3)->create();
diff --git a/tests/Feature/Api/Users/UsersSearchTest.php b/tests/Feature/Api/Users/UsersSearchTest.php
index 723a115db1..72f23017f5 100644
--- a/tests/Feature/Api/Users/UsersSearchTest.php
+++ b/tests/Feature/Api/Users/UsersSearchTest.php
@@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Users;
use App\Models\Company;
use App\Models\User;
use Laravel\Passport\Passport;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class UsersSearchTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCanSearchByUserFirstAndLastName()
{
User::factory()->create(['first_name' => 'Luke', 'last_name' => 'Skywalker']);
diff --git a/tests/Feature/Api/Users/UsersUpdateTest.php b/tests/Feature/Api/Users/UsersUpdateTest.php
index 953a671cf1..d6e0f9e46b 100644
--- a/tests/Feature/Api/Users/UsersUpdateTest.php
+++ b/tests/Feature/Api/Users/UsersUpdateTest.php
@@ -8,13 +8,10 @@ use App\Models\Group;
use App\Models\Location;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class UsersUpdateTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCanUpdateUserViaPatch()
{
$admin = User::factory()->superuser()->create();
diff --git a/tests/Feature/Checkins/AccessoryCheckinTest.php b/tests/Feature/Checkins/AccessoryCheckinTest.php
index 25cd5d0d87..56030991e2 100644
--- a/tests/Feature/Checkins/AccessoryCheckinTest.php
+++ b/tests/Feature/Checkins/AccessoryCheckinTest.php
@@ -8,13 +8,10 @@ use App\Models\User;
use App\Notifications\CheckinAccessoryNotification;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AccessoryCheckinTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCheckingInAccessoryRequiresCorrectPermission()
{
$accessory = Accessory::factory()->checkedOutToUser()->create();
diff --git a/tests/Feature/Checkins/AssetCheckinTest.php b/tests/Feature/Checkins/AssetCheckinTest.php
index fb6d21a6ac..1e6d2b995b 100644
--- a/tests/Feature/Checkins/AssetCheckinTest.php
+++ b/tests/Feature/Checkins/AssetCheckinTest.php
@@ -11,13 +11,10 @@ use App\Models\Statuslabel;
use App\Models\User;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Event;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetCheckinTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCheckingInAssetRequiresCorrectPermission()
{
$this->actingAs(User::factory()->create())
diff --git a/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php b/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php
index a49b1167cb..bdaf0e780f 100644
--- a/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php
+++ b/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php
@@ -7,13 +7,10 @@ use App\Models\CheckoutAcceptance;
use App\Notifications\AcceptanceAssetAcceptedNotification;
use App\Notifications\AcceptanceAssetDeclinedNotification;
use Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AccessoryAcceptanceTest extends TestCase
{
- use InteractsWithSettings;
-
/**
* This can be absorbed into a bigger test
*/
diff --git a/tests/Feature/Checkouts/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/AccessoryCheckoutTest.php
index cbe9801cc0..11224e4d1f 100644
--- a/tests/Feature/Checkouts/AccessoryCheckoutTest.php
+++ b/tests/Feature/Checkouts/AccessoryCheckoutTest.php
@@ -7,13 +7,10 @@ use App\Models\Actionlog;
use App\Models\User;
use App\Notifications\CheckoutAccessoryNotification;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AccessoryCheckoutTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCheckingOutAccessoryRequiresCorrectPermission()
{
$this->actingAs(User::factory()->create())
diff --git a/tests/Feature/Checkouts/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/ConsumableCheckoutTest.php
index 5785d0572b..e38ae96c83 100644
--- a/tests/Feature/Checkouts/ConsumableCheckoutTest.php
+++ b/tests/Feature/Checkouts/ConsumableCheckoutTest.php
@@ -7,13 +7,10 @@ use App\Models\Consumable;
use App\Models\User;
use App\Notifications\CheckoutConsumableNotification;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class ConsumableCheckoutTest extends TestCase
{
- use InteractsWithSettings;
-
public function testCheckingOutConsumableRequiresCorrectPermission()
{
$this->actingAs(User::factory()->create())
diff --git a/tests/Feature/Checkouts/LicenseCheckoutTest.php b/tests/Feature/Checkouts/LicenseCheckoutTest.php
index 978fac28f2..2f4f51d4ac 100644
--- a/tests/Feature/Checkouts/LicenseCheckoutTest.php
+++ b/tests/Feature/Checkouts/LicenseCheckoutTest.php
@@ -6,13 +6,10 @@ use App\Models\Asset;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class LicenseCheckoutTest extends TestCase
{
- use InteractsWithSettings;
-
public function testNotesAreStoredInActionLogOnCheckoutToAsset()
{
$admin = User::factory()->superuser()->create();
diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php
index 4e9459fb06..4690a13901 100644
--- a/tests/Feature/DashboardTest.php
+++ b/tests/Feature/DashboardTest.php
@@ -3,13 +3,10 @@
namespace Tests\Feature;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class DashboardTest extends TestCase
{
- use InteractsWithSettings;
-
public function testUsersWithoutAdminAccessAreRedirected()
{
$this->actingAs(User::factory()->create())
diff --git a/tests/Feature/Notifications/AccessoryWebhookTest.php b/tests/Feature/Notifications/AccessoryWebhookTest.php
index 2e3ef999ba..42a48c9ebe 100644
--- a/tests/Feature/Notifications/AccessoryWebhookTest.php
+++ b/tests/Feature/Notifications/AccessoryWebhookTest.php
@@ -11,13 +11,10 @@ use App\Notifications\CheckinAccessoryNotification;
use App\Notifications\CheckoutAccessoryNotification;
use Illuminate\Notifications\AnonymousNotifiable;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AccessoryWebhookTest extends TestCase
{
- use InteractsWithSettings;
-
public function testAccessoryCheckoutSendsWebhookNotificationWhenSettingEnabled()
{
Notification::fake();
diff --git a/tests/Feature/Notifications/AssetWebhookTest.php b/tests/Feature/Notifications/AssetWebhookTest.php
index 95218f98e7..93da395a37 100644
--- a/tests/Feature/Notifications/AssetWebhookTest.php
+++ b/tests/Feature/Notifications/AssetWebhookTest.php
@@ -12,13 +12,10 @@ use App\Notifications\CheckinAssetNotification;
use App\Notifications\CheckoutAssetNotification;
use Illuminate\Notifications\AnonymousNotifiable;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetWebhookTest extends TestCase
{
- use InteractsWithSettings;
-
public function targets(): array
{
return [
diff --git a/tests/Feature/Notifications/ComponentWebhookTest.php b/tests/Feature/Notifications/ComponentWebhookTest.php
index 2e2a535219..f6aa8a6689 100644
--- a/tests/Feature/Notifications/ComponentWebhookTest.php
+++ b/tests/Feature/Notifications/ComponentWebhookTest.php
@@ -8,14 +8,10 @@ use App\Models\Asset;
use App\Models\Component;
use App\Models\User;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class ComponentWebhookTest extends TestCase
{
-
- use InteractsWithSettings;
-
public function testComponentCheckoutDoesNotSendWebhookNotification()
{
Notification::fake();
diff --git a/tests/Feature/Notifications/ConsumableWebhookTest.php b/tests/Feature/Notifications/ConsumableWebhookTest.php
index 2815731bd2..2a1126f917 100644
--- a/tests/Feature/Notifications/ConsumableWebhookTest.php
+++ b/tests/Feature/Notifications/ConsumableWebhookTest.php
@@ -9,13 +9,10 @@ use App\Models\User;
use App\Notifications\CheckoutConsumableNotification;
use Illuminate\Notifications\AnonymousNotifiable;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class ConsumableWebhookTest extends TestCase
{
- use InteractsWithSettings;
-
public function testConsumableCheckoutSendsWebhookNotificationWhenSettingEnabled()
{
Notification::fake();
diff --git a/tests/Feature/Notifications/LicenseWebhookTest.php b/tests/Feature/Notifications/LicenseWebhookTest.php
index 24ec53a75e..2ee14f9134 100644
--- a/tests/Feature/Notifications/LicenseWebhookTest.php
+++ b/tests/Feature/Notifications/LicenseWebhookTest.php
@@ -12,13 +12,10 @@ use App\Notifications\CheckinLicenseSeatNotification;
use App\Notifications\CheckoutLicenseSeatNotification;
use Illuminate\Notifications\AnonymousNotifiable;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class LicenseWebhookTest extends TestCase
{
- use InteractsWithSettings;
-
public function targets(): array
{
return [
diff --git a/tests/Feature/Reports/CustomReportTest.php b/tests/Feature/Reports/CustomReportTest.php
index dd3199212e..d90e4cb2a0 100644
--- a/tests/Feature/Reports/CustomReportTest.php
+++ b/tests/Feature/Reports/CustomReportTest.php
@@ -8,14 +8,10 @@ use App\Models\User;
use Illuminate\Testing\TestResponse;
use League\Csv\Reader;
use PHPUnit\Framework\Assert;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
-
class CustomReportTest extends TestCase
{
- use InteractsWithSettings;
-
protected function setUp(): void
{
parent::setUp();
diff --git a/tests/Feature/Users/UpdateUserTest.php b/tests/Feature/Users/UpdateUserTest.php
index 92245059ef..934fbce2b8 100644
--- a/tests/Feature/Users/UpdateUserTest.php
+++ b/tests/Feature/Users/UpdateUserTest.php
@@ -3,13 +3,10 @@
namespace Tests\Feature\Users;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class UpdateUserTest extends TestCase
{
- use InteractsWithSettings;
-
public function testUsersCanBeActivatedWithNumber()
{
$admin = User::factory()->superuser()->create();
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 03f273ad6f..9b77eeb328 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -15,6 +15,7 @@ abstract class TestCase extends BaseTestCase
use CreatesApplication;
use CustomTestMacros;
use InteractsWithAuthentication;
+ use InteractsWithSettings;
use LazilyRefreshDatabase;
private array $globallyDisabledMiddleware = [
diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php
index 69c4c30938..46a0efdd7c 100644
--- a/tests/Unit/AssetMaintenanceTest.php
+++ b/tests/Unit/AssetMaintenanceTest.php
@@ -2,14 +2,10 @@
namespace Tests\Unit;
use App\Models\AssetMaintenance;
-use Carbon\Carbon;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetMaintenanceTest extends TestCase
{
- use InteractsWithSettings;
-
public function testZerosOutWarrantyIfBlank()
{
$c = new AssetMaintenance;
diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.php
index aec8edf692..4cc62e20a0 100644
--- a/tests/Unit/AssetModelTest.php
+++ b/tests/Unit/AssetModelTest.php
@@ -4,13 +4,10 @@ namespace Tests\Unit;
use App\Models\Asset;
use App\Models\Category;
use App\Models\AssetModel;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetModelTest extends TestCase
{
- use InteractsWithSettings;
-
public function testAnAssetModelContainsAssets()
{
$category = Category::factory()->create([
diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php
index 7670d10753..913d9f639e 100644
--- a/tests/Unit/AssetTest.php
+++ b/tests/Unit/AssetTest.php
@@ -5,13 +5,10 @@ use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Category;
use Carbon\Carbon;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class AssetTest extends TestCase
{
- use InteractsWithSettings;
-
public function testAutoIncrement()
{
$this->settings->enableAutoIncrement();
diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php
index c74597b1b4..387ed946e0 100644
--- a/tests/Unit/CategoryTest.php
+++ b/tests/Unit/CategoryTest.php
@@ -4,13 +4,10 @@ namespace Tests\Unit;
use App\Models\Category;
use App\Models\AssetModel;
use App\Models\Asset;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class CategoryTest extends TestCase
{
- use InteractsWithSettings;
-
public function testFailsEmptyValidation()
{
// An Asset requires a name, a qty, and a category_id.
diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php
index 669dd5ed41..3923dd9f7d 100644
--- a/tests/Unit/CompanyScopingTest.php
+++ b/tests/Unit/CompanyScopingTest.php
@@ -12,13 +12,10 @@ use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class CompanyScopingTest extends TestCase
{
- use InteractsWithSettings;
-
public function models(): array
{
return [
diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php
index 8f71057bfc..df8f64771f 100644
--- a/tests/Unit/ComponentTest.php
+++ b/tests/Unit/ComponentTest.php
@@ -5,13 +5,10 @@ use App\Models\Category;
use App\Models\Company;
use App\Models\Component;
use App\Models\Location;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class ComponentTest extends TestCase
{
- use InteractsWithSettings;
-
public function testAComponentBelongsToACompany()
{
$component = Component::factory()
diff --git a/tests/Unit/DepreciationTest.php b/tests/Unit/DepreciationTest.php
index ed033cf442..4dd8422276 100644
--- a/tests/Unit/DepreciationTest.php
+++ b/tests/Unit/DepreciationTest.php
@@ -5,13 +5,10 @@ use App\Models\Depreciation;
use App\Models\Category;
use App\Models\License;
use App\Models\AssetModel;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class DepreciationTest extends TestCase
{
- use InteractsWithSettings;
-
public function testADepreciationHasModels()
{
$depreciation = Depreciation::factory()->create();
diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php
index c286b38496..6beb0d2118 100644
--- a/tests/Unit/LdapTest.php
+++ b/tests/Unit/LdapTest.php
@@ -3,8 +3,6 @@
namespace Tests\Unit;
use App\Models\Ldap;
-use Exception;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
/**
@@ -12,7 +10,6 @@ use Tests\TestCase;
*/
class LdapTest extends TestCase
{
- use InteractsWithSettings;
use \phpmock\phpunit\PHPMock;
public function testConnect()
diff --git a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php
index 1ca88d7cac..6d77c88731 100644
--- a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php
+++ b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php
@@ -4,13 +4,10 @@ namespace Tests\Unit\Models\Company;
use App\Models\Company;
use App\Models\User;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class GetIdForCurrentUserTest extends TestCase
{
- use InteractsWithSettings;
-
public function testReturnsProvidedValueWhenFullCompanySupportDisabled()
{
$this->settings->disableMultipleFullCompanySupport();
diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php
index 64cf8afb0a..8005759a1e 100644
--- a/tests/Unit/NotificationTest.php
+++ b/tests/Unit/NotificationTest.php
@@ -8,13 +8,10 @@ use App\Models\Category;
use Carbon\Carbon;
use App\Notifications\CheckoutAssetNotification;
use Illuminate\Support\Facades\Notification;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class NotificationTest extends TestCase
{
- use InteractsWithSettings;
-
public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA()
{
$admin = User::factory()->superuser()->create();
diff --git a/tests/Unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.php
index ad4231010f..2bc81da61b 100644
--- a/tests/Unit/SnipeModelTest.php
+++ b/tests/Unit/SnipeModelTest.php
@@ -2,13 +2,10 @@
namespace Tests\Unit;
use App\Models\SnipeModel;
-use Tests\Support\InteractsWithSettings;
use Tests\TestCase;
class SnipeModelTest extends TestCase
{
- use InteractsWithSettings;
-
public function testSetsPurchaseDatesAppropriately()
{
$c = new SnipeModel;