From 43ff7261b2c5fb821785bfb641a9afd3c869fb96 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 7 Mar 2023 16:57:55 -0800 Subject: [PATCH] Remove redundant base test case --- .../Api/Users/UsersForSelectListTest.php | 3 --- tests/TestCase.php | 2 ++ tests/Unit/AccessoryTest.php | 4 ++-- tests/Unit/AssetMaintenanceTest.php | 4 ++-- tests/Unit/AssetModelTest.php | 4 ++-- tests/Unit/AssetTest.php | 4 ++-- tests/Unit/BaseTest.php | 17 ----------------- tests/Unit/CategoryTest.php | 4 ++-- tests/Unit/CompanyTest.php | 4 ++-- tests/Unit/ComponentTest.php | 4 ++-- tests/Unit/CustomFieldTest.php | 4 ++-- tests/Unit/DepreciationTest.php | 4 ++-- tests/Unit/ImporterTest.php | 4 ++-- tests/Unit/LocationTest.php | 4 ++-- tests/Unit/NotificationTest.php | 4 ++-- tests/Unit/PermissionsTest.php | 4 ++-- tests/Unit/SnipeModelTest.php | 4 ++-- tests/Unit/StatuslabelTest.php | 4 ++-- tests/Unit/UserTest.php | 4 ++-- 19 files changed, 34 insertions(+), 52 deletions(-) delete mode 100644 tests/Unit/BaseTest.php diff --git a/tests/Feature/Api/Users/UsersForSelectListTest.php b/tests/Feature/Api/Users/UsersForSelectListTest.php index 0aca637eb9..b4ede4b117 100644 --- a/tests/Feature/Api/Users/UsersForSelectListTest.php +++ b/tests/Feature/Api/Users/UsersForSelectListTest.php @@ -5,15 +5,12 @@ namespace Tests\Feature\Api\Users; use App\Models\Company; use App\Models\Setting; use App\Models\User; -use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Illuminate\Testing\Fluent\AssertableJson; use Laravel\Passport\Passport; use Tests\TestCase; class UsersForSelectListTest extends TestCase { - use LazilyRefreshDatabase; - public function testUsersAreReturned() { Setting::factory()->create(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 4a19344eb3..efa533b8cc 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,11 +4,13 @@ namespace Tests; use App\Http\Middleware\SecurityHeaders; use App\Models\Setting; +use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { use CreatesApplication; + use LazilyRefreshDatabase; private array $globallyDisabledMiddleware = [ SecurityHeaders::class, diff --git a/tests/Unit/AccessoryTest.php b/tests/Unit/AccessoryTest.php index a9ed782aea..25bd849b61 100644 --- a/tests/Unit/AccessoryTest.php +++ b/tests/Unit/AccessoryTest.php @@ -9,9 +9,9 @@ use App\Models\Company; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\WithoutMiddleware; -use Tests\Unit\BaseTest; +use Tests\TestCase; -class AccessoryTest extends BaseTest +class AccessoryTest extends TestCase { /** * @var \UnitTester diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php index ad16679887..d403b7ff92 100644 --- a/tests/Unit/AssetMaintenanceTest.php +++ b/tests/Unit/AssetMaintenanceTest.php @@ -2,10 +2,10 @@ namespace Tests\Unit; use App\Models\AssetMaintenance; -use Tests\Unit\BaseTest; use Carbon\Carbon; +use Tests\TestCase; -class AssetMaintenanceTest extends BaseTest +class AssetMaintenanceTest extends TestCase { /** * @var \UnitTester diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.php index d7c18dc9a7..d1582c9066 100644 --- a/tests/Unit/AssetModelTest.php +++ b/tests/Unit/AssetModelTest.php @@ -7,9 +7,9 @@ use App\Models\AssetModel; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\WithoutMiddleware; -use Tests\Unit\BaseTest; +use Tests\TestCase; -class AssetModelTest extends BaseTest +class AssetModelTest extends TestCase { /** * @var \UnitTester diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index e3fa5b4497..d49137be74 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -11,12 +11,12 @@ use App\Models\Category; use Carbon\Carbon; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\WithoutMiddleware; -use Tests\Unit\BaseTest; use App\Models\Component; use App\Models\ActionLog; +use Tests\TestCase; -class AssetTest extends BaseTest +class AssetTest extends TestCase { /** * @var \UnitTester diff --git a/tests/Unit/BaseTest.php b/tests/Unit/BaseTest.php deleted file mode 100644 index 977e8b02eb..0000000000 --- a/tests/Unit/BaseTest.php +++ /dev/null @@ -1,17 +0,0 @@ -