Level 60
Hi, https://laravel.com/docs/5.1/testing#sessions-and-authentication
public function testApplication()
{
$user = factory(App\User::class)->create();
$this->actingAs($user)
1 like
Hello ,
In my test I would like to login as user then get specific url status !
public function test_links()
{
$this->post('/login', [
'email' => '[email protected]',
'password' => 'password',
])
->get('/myprofile')
->assertStatus(200);
}
Please or to participate in this conversation.