Laravel dusk does not seem to use the APP_URL set in .env.dusk.local file.
This is my .env.dusk.local file:
APP_URL=http://local.project/
BASE_URL=http://local.project/
APP_ENV=testing
DB_CONNECTION=dusk
This is my login test:
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
class LoginTest extends DuskTestCase
{
/**
* test_I_can_login_successfully
*
* @return void
*/
public function test_I_can_login_successfully()
{
$this->browse(function ($browser) {
$browser->visit('login')
->keys('#email', 'test@test.co.uk')
->keys('#password', 'test')
->click('.btn-primary')
->assertPathIs('dashboard')
->assertSee('Marco');
});
}
}
But when I run the test instead of going to http://local.project/login goes to http://localhost/public/local
Why is that?
Aucun commentaire:
Enregistrer un commentaire