mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Remove redundant base test case
This commit is contained in:
parent
8c13a4c5c9
commit
43ff7261b2
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\TestCase;
|
||||
use Auth;
|
||||
use Artisan;
|
||||
|
||||
abstract class BaseTest extends TestCase
|
||||
{
|
||||
use LazilyRefreshDatabase;
|
||||
}
|
|
@ -5,12 +5,12 @@ use App\Models\Category;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\Unit\BaseTest;
|
||||
use App\Models\AssetModel;
|
||||
use App\Models\Asset;
|
||||
use App\Models\Accessory;
|
||||
use Tests\TestCase;
|
||||
|
||||
class CategoryTest extends BaseTest
|
||||
class CategoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -5,13 +5,13 @@ use App\Models\Company;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\Unit\BaseTest;
|
||||
use App\Models\Component;
|
||||
use App\Models\Asset;
|
||||
use App\Models\Consumable;
|
||||
use App\Models\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
class CompanyTest extends BaseTest
|
||||
class CompanyTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -8,9 +8,9 @@ use App\Models\Location;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ComponentTest extends BaseTest
|
||||
class ComponentTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -5,13 +5,13 @@ use App\Models\CustomField;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
/*
|
||||
* Test strings for db column names gathered from
|
||||
* http://www.omniglot.com/language/phrases/hovercraft.htm
|
||||
*/
|
||||
class CustomFieldTest extends BaseTest
|
||||
class CustomFieldTest extends TestCase
|
||||
{
|
||||
protected $tester;
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
namespace Tests\Unit;
|
||||
|
||||
use App\Models\Depreciation;
|
||||
use Tests\Unit\BaseTest;
|
||||
use App\Models\Category;
|
||||
use App\Models\License;
|
||||
use App\Models\AssetModel;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DepreciationTest extends BaseTest
|
||||
class DepreciationTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -17,9 +17,9 @@ use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ImporterTest extends BaseTest
|
||||
class ImporterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
namespace Tests\Unit;
|
||||
|
||||
use App\Models\Location;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
||||
class LocationTest extends BaseTest
|
||||
class LocationTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -8,10 +8,10 @@ use App\Models\Category;
|
|||
use Carbon\Carbon;
|
||||
use App\Notifications\CheckoutAssetNotification;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
||||
class NotificationTest extends BaseTest
|
||||
class NotificationTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -10,9 +10,9 @@ use App\Models\User;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
class PermissionsTest extends BaseTest
|
||||
class PermissionsTest extends TestCase
|
||||
{
|
||||
// public function _before()
|
||||
// {
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
namespace Tests\Unit;
|
||||
|
||||
use App\Models\SnipeModel;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
class SnipeModelTest extends BaseTest
|
||||
class SnipeModelTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -5,9 +5,9 @@ use App\Models\Statuslabel;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
class StatuslabelTest extends BaseTest
|
||||
class StatuslabelTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
|
@ -5,9 +5,9 @@ use App\Models\User;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Tests\Unit\BaseTest;
|
||||
use Tests\TestCase;
|
||||
|
||||
class UserTest extends BaseTest
|
||||
class UserTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
|
|
Loading…
Reference in a new issue