request('GET', '/api/groups/stats'); self::assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); self::assertJsonEquals([ '@context' => '/api/contexts/Group', '@id' => '/api/groups/stats', '@type' => 'Group', 'count' => self::COUNT, ]); $responseArray = $response->toArray(); self::assertEqualsCanonicalizing(['@context', '@id', '@type', 'count'], array_keys($responseArray)); } }