I'm trying to unit test and this is the output format of my api:
{
"data": {
"company": {
"idCompany": 1,
"name": "My Company",
"noUsers": 1,
"users": [
{
"idUser": 1,
"name": "John Doe"
}
]
}
}
}
My unit test is using:
$response
->assertStatus(200)
->assertJsonStructure($expected);
What is the format for the variable $expected
to match my json format?