private function validateRequest($method, $resource, $params = null, $response = null) { if (null !== $params) { $client = $this->httpClient->expects($this->once())->method($method)->with($this->equalTo($resource), is_array($params) ? $this->equalTo($params) : $params); } else { $client = $this->httpClient->expects($this->once())->method($method)->with($this->equalTo($resource)); } if (null !== $response) { $client->will($this->returnValue($response)); } }
private function doCreateEncoding(array $params) { $response = $this->httpClient->post('/encodings.json', $params); $transformer = $this->transformers->getEncodingTransformer(); return $transformer->stringToEncoding($response); }