mardi 26 avril 2016

Laravel 5.1 test the type of the data response

I'm using laravel 5.1 and I want to test the type of the returned data. This is what my controller returns return response()->json(['success' => true, 'data' => $var]);

In the test I want to check the type of the $var (if it's an array or not). This is what I did but it doesn't works. $this->get('/app') ->seeJson(['success'=>true, 'data'=>[]]);

Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire