public function testHeadQueryString() { $http = new Service($this->_testConfig); $expected = array('foo' => 'bar'); $result = $http->head('/', $expected); $this->assertEqual($expected, $http->last->request->query); }
public function testCurlGet() { $service = new Service(array('classes' => array('socket' => '\\lithium\\net\\socket\\Curl'))); $service->head(); $expected = array('code' => 200, 'message' => 'OK'); $result = $service->last->response->status; $this->assertEqual($expected, $result); }
public function testHead() { $http = new Service($this->_testConfig); $this->assertEqual('', $http->head()); $this->assertEqual('HTTP/1.1', $http->last->response->protocol); $this->assertEqual('200', $http->last->response->status['code']); $this->assertEqual('OK', $http->last->response->status['message']); $this->assertEqual('text/html', $http->last->response->type); $this->assertEqual('UTF-8', $http->last->response->encoding); $this->assertEqual('', $http->last->response->body()); }