public function testAllMethodsNoConnection() { $http = new Http(array('socket' => false)); $this->assertNotEmpty($http->connect()); $this->assertNotEmpty($http->disconnect()); $this->assertEmpty($http->get()); $this->assertEmpty($http->post()); $this->assertEmpty($http->put()); }
public function testGetPath() { $http = new Http($this->_testConfig); $result = $http->get('search.json'); $result = $http->last->response->protocol; $this->assertEqual('HTTP/1.1', $result); $result = $http->last->response->status['code']; $this->assertEqual('200', $result); $result = $http->last->response->status['message']; $this->assertEqual('OK', $result); $result = $http->last->response->type; $this->assertEqual('text/html', $result); $result = $http->last->response->encoding; $this->assertEqual('UTF-8', $result); }