lithium\tests\cases\net\http\ServiceTest::testReturnHandlers PHP Method

testReturnHandlers() public method

public testReturnHandlers ( )
    public function testReturnHandlers()
    {
        $http = new Service($this->_testConfig);
        $result = $http->get(null, null, array('return' => 'headers'));
        $this->assertEqual('localhost:80', $result['Host']);
        $result = $http->get(null, null, array('return' => 'response'));
        $this->assertEqual($result, $http->last->response);
        $result = $http->get(null, null, array('return' => 'body'));
        $this->assertEqual($result, $http->last->response->body());
    }