Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Aug 11, 2023
1 parent 3d24721 commit c389d6c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/Browser/DatabaseMigrationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\Facades\Schema;
use Orchestra\Testbench\Dusk\TestCase;
use function Orchestra\Testbench\workbench_path;

class DatabaseMigrationsTest extends TestCase
{
Expand All @@ -23,7 +24,7 @@ protected function setUp(): void
*/
protected function defineDatabaseMigrations()
{
$this->loadMigrationsFrom(__DIR__.'/../migrations');
$this->loadMigrationsFrom(workbench_path('database/migrations'));
}

/** @test */
Expand Down
17 changes: 15 additions & 2 deletions tests/Browser/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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()
{
Expand Down

0 comments on commit c389d6c

Please sign in to comment.