client = static::createClient(); } /** * Send a requests, parse the hydra response and return an object or a Collection * * @param string $method * @param string $route * @param array $parameters * @return ResponseInterface */ protected function request(string $method, string $route, array $parameters = []): ResponseInterface { return $this->client->request( $method, $route, $parameters ); } /** * Send a GET request and return the response parsed content * * @param string $route * @param array $parameters * @return ResponseInterface */ protected function get(string $route, array $parameters = []): ResponseInterface { return $this->request( Request::METHOD_GET, $route, $parameters ); } protected function validateCollectionSchema(string $resourceClass): void { $this->assertResponseIsSuccessful(); // Asserts that the returned content type is JSON-LD (the default) $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); // Asserts that the returned JSON is validated by the JSON Schema generated for this resource by API Platform // >>> Issue with the json typed PublicStructure::addresses properties // $this->assertMatchesResourceCollectionJsonSchema($resourceClass); } }