diff --git a/tests/Browser/DatabaseMigrationsTest.php b/tests/Browser/DatabaseMigrationsTest.php index 5f6bbd72..24d94a3d 100644 --- a/tests/Browser/DatabaseMigrationsTest.php +++ b/tests/Browser/DatabaseMigrationsTest.php @@ -4,6 +4,7 @@ use Illuminate\Support\Facades\Schema; use Orchestra\Testbench\Dusk\TestCase; +use function Orchestra\Testbench\workbench_path; class DatabaseMigrationsTest extends TestCase { @@ -23,7 +24,7 @@ protected function setUp(): void */ protected function defineDatabaseMigrations() { - $this->loadMigrationsFrom(__DIR__.'/../migrations'); + $this->loadMigrationsFrom(workbench_path('database/migrations')); } /** @test */ diff --git a/tests/Browser/RouteTest.php b/tests/Browser/RouteTest.php index feb34fa5..177862d9 100644 --- a/tests/Browser/RouteTest.php +++ b/tests/Browser/RouteTest.php @@ -15,13 +15,17 @@ class RouteTest extends TestCase */ protected function defineEnvironment($app) { - $app['router']->get('hello', ['as' => 'hi', 'uses' => function () { + $app['router']->get('hello', ['uses' => function () { return 'hello world'; }]); - $app['router']->get('config', ['as' => 'hi', 'uses' => function () { + $app['router']->get('config', ['uses' => function () { return config('new_config_item'); }]); + + $app['router']->get('environment', ['uses' => function () { + return config('app.env'); + }]); } /** @test */ @@ -33,6 +37,15 @@ public function can_use_dusk() }); } + /** @test */ + public function can_return_correct_application_environment() + { + $this->browse(function (Browser $browser) { + $browser->visit('environment') + ->assertSee('testing'); + }); + } + /** @test */ public function can_use_multiple_browsers() { diff --git a/tests/migrations/2014_10_12_000000_create_tests_table.php b/workbench/database/migrations/2014_10_12_000000_create_tests_table.php similarity index 100% rename from tests/migrations/2014_10_12_000000_create_tests_table.php rename to workbench/database/migrations/2014_10_12_000000_create_tests_table.php