lithium\tests\cases\net\http\MessageTest::testHeaderKey PHP Method

testHeaderKey() public method

public testHeaderKey ( )
    public function testHeaderKey()
    {
        $this->message->headers('Host: localhost:80');
        $expected = array('Host: localhost:80');
        $result = $this->message->headers();
        $this->assertEqual($expected, $result);
        $this->message->headers('Host');
        $expected = 'localhost:80';
        $result = $this->message->headers('Host');
        $this->assertEqual($expected, $result);
        $this->message->headers('Host', false);
        $result = $this->message->headers();
        $this->assertEmpty($result);
    }