diff --git a/tests/TestCase.php b/tests/TestCase.php index 0a576e557..f3f4a5091 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -10,8 +10,9 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase //protected $baseUrl = 'http://snipe-it5.dev:8888'; function __construct() { - parent::setUp(); parent::createApplication(); + parent::setUp(); + } /** @@ -21,7 +22,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase */ public function createApplication() { - $app = require __DIR__.'/../bootstrap/app.php'; + $app = require_once __DIR__.'/../bootstrap/app.php'; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); return $app; } diff --git a/tests/unit/AccessoryTest.php b/tests/unit/AccessoryTest.php index e07da3817..2746344ce 100644 --- a/tests/unit/AccessoryTest.php +++ b/tests/unit/AccessoryTest.php @@ -15,7 +15,7 @@ class AccessoryTest extends \Codeception\TestCase\Test public function testAccessoryAdd() { - $accessory = factory(Accessory::class, 'accessory')->make(); + $accessory = factory(\App\Models\Accessory::class, 'accessory')->make(); $values = [ 'name' => $accessory->name, 'category_id' => $accessory->category_id,