/** * {@inheritDoc} */ public function patch($path, $body = null, array $parameters = array(), array $headers = array()) { $parameters = $this->buildQueryParameters($parameters); return $this->request($this->client->patch($path, $headers, $body, $parameters)); }
function it_format_the_request_to_a_valid_form_urlencode(ClientInterface $client, RequestInterface $request) { $client->patch('/resource', ['Content-Type' => 'application/x-www-form-urlencoded'], 'foo=bar&baz=plop', ['some options'])->shouldBeCalled(1)->willReturn($request); $this->setClient($client); $this->build('/resource', null, null, null, ['foo' => 'bar', 'baz' => 'plop'], ['some options'])->shouldReturn($request); }