when I use assertJsonValidationErrors() testing method in laravel 5.5 I get the following error :
Call to undefined method Illuminate\Http\JsonResponse::assertJsonValidationErrors()
I don't know what is wrong. this is my test method :
public function test_user_login_when_phone_is_empty()
{
$response = $this->json(
'POST',
route('login'),
[
'phone' => '',
'password' => 'sdfksfhas4u'
]
);
$response
->assertJsonValidationErrors(['phone'])
;
}
any help guys?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire