/** * Method to test put(). * * @return void * * @covers Windwalker\Http\HttpClient::put */ public function testPut() { $url = 'http://example.com/?foo=bar'; $data = array('flower' => 'sakura'); $headers = array('X-Foo' => 'Bar'); $this->instance->put($url, $data, $headers); $this->assertEquals('PUT', $this->transport->request->getMethod()); $this->assertEquals($url, $this->transport->request->getRequestTarget()); $this->assertEquals('Bar', $this->transport->request->getHeaderLine('X-Foo')); $this->assertEquals(UriHelper::buildQuery($data), $this->transport->request->getBody()->__toString()); }