From 68c8264bdad5b57d7660d2f56fbdea3ce79b9a2f Mon Sep 17 00:00:00 2001 From: Florian Heller Date: Wed, 19 Jul 2017 18:48:32 +0200 Subject: [PATCH] Switched from artisan to loadMigrationsFrom command to continue using --realpath option (see: https://github.com/orchestral/testbench#using-migrations) --- tests/TestCase.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index ecde9b7..cb061f6 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -5,6 +5,7 @@ use Illuminate\Support\Facades\DB; use Laracasts\TestDummy\Factory; use Spiritix\LadaCache\LadaCacheServiceProvider; +use Orchestra\Database\ConsoleServiceProvider; class TestCase extends \Orchestra\Testbench\TestCase { @@ -14,9 +15,9 @@ public function setUp() { parent::setUp(); - $this->artisan('migrate', [ + $this->loadMigrationsFrom([ '--database' => 'testing', - '--realpath' => realpath(__DIR__ . '/../database/migrations'), + '--realpath' => realpath(__DIR__.'/../database/migrations'), ]); $this->factory = new Factory(__DIR__ . '/../database/factories'); @@ -33,7 +34,10 @@ public function tearDown() protected function getPackageProviders($app) { - return [LadaCacheServiceProvider::class]; + return [ + LadaCacheServiceProvider::class, + ConsoleServiceProvider::class + ]; } protected function getEnvironmentSetUp($app)