mercredi 27 novembre 2019

testing controllers requiring login

I'm learning PHPUnit and I want to testing page witch requiring login (like change your password, add a new article, etc). Normal test look like this

$response = $this->get('/');

 $response->assertStatus(200);

But if page requires authentication (is intended for logged in users), it won't work. How I can solve my problem?

Aucun commentaire:

Enregistrer un commentaire