15 lines
555 B
PHP
15 lines
555 B
PHP
<?php declare(strict_types=1);
|
|
|
|
test('orders', function (): void {
|
|
$response = $this->client->request('GET', '/api/food_orders');
|
|
$this->assertResponseIsSuccessful();
|
|
$this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8');
|
|
$this->assertJsonContains([
|
|
'@context' => '/api/contexts/FoodOrder',
|
|
'@id' => '/api/food_orders',
|
|
'@type' => 'Collection',
|
|
'totalItems' => 1,
|
|
]);
|
|
$array = $response->toArray();
|
|
expect($array['member'][0]['orderItems'])->toHaveCount(10);
|
|
});
|