jeudi 26 janvier 2017

How to assert in laravel 5.4 that each record in the list has at least enlisted attributes?

I am just moving app from laravel 5.3 to 5.4. In laravel 5.3 in my API tests I could verify that each record in response has given attributes with following code:

$this->json('get', '/api/course-types')
        ->seeJsonStructure([
            '*' => ['id', 'aaa', 'bbb', 'ccc', 'ddd']
        ]);

How I can do the same with laravel 5.4?

There is no such method in Illuminate/Foundation/Testing/TestResponse



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire