private function getBuilderCommon($url, array $headers = array()) { $b = new BasicRequestBuilder(); $b->url($url); foreach ($headers as $h) { $b->header($h); } return $b; }
public function testError() { $client = new BasicClient(); $b = new BasicRequestBuilder(); $req = $b->method(Http::METHOD_PUT)->url('http://www.google.com')->build(); $resp = $client->makeRequest($req); $this->assertEquals($resp->getStatus(), 405); // method not allowed }