getClientAuthenticated(); $client->request('GET', '/api/1.0/main/news/current.json'); $this->assertResponseIsSuccessful('Testing whether the GET request to the news item Api endpoint was successful'); $responseContent = json_decode($client->getResponse()->getContent(), true, 512, JSON_THROW_ON_ERROR); if (!empty($responseContent['data'][0])) { $this->assertArrayHasKey('title', $responseContent['data'][0]); } } }