Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 781 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 781 Bytes

TestResponse::assertJsonStructureMissing

The TestResponse::assertJsonStructureMissing assertion works just like TestResponse::assertJsonStructure, except that it tests for the absence of a particular structure.

$response = $this->get('/data');
$response->assertJsonStructureMissing([
    'data' => [
        'related' => [
            '*' => [
                'attribute',
            ],
        ],
    ],
]);

Full credit for this package goes to Behzad Shabani. This package just takes his pull request and packages it up so it's super easy to add to your Laravel application.