create(); $controller = new NewsController(new Response(), $this->url); $response = $controller->index(); $this->validateApiResponse('/news', 'get', $response); $this->assertEquals(['application/json'], $response->getHeader('content-type')); $this->assertJson($response->getContent()); $data = json_decode($response->getContent(), true); $this->assertArrayHasKey('data', $data); $this->assertCount(3, $data['data']); } }