lithium\tests\integration\net\socket\StreamTest::testStreamAdapter PHP Method

testStreamAdapter() public method

public testStreamAdapter ( )
    public function testStreamAdapter()
    {
        $socket = new Stream($this->_testConfig);
        $this->assertNotEmpty($socket->open());
        $response = $socket->send();
        $this->assertInstanceOf('lithium\\net\\http\\Response', $response);
        $expected = 'example.org';
        $result = $response->host;
        $this->assertEqual($expected, $result);
        $result = $response->body();
        $this->assertPattern("/<title[^>]*>Example Domain<\\/title>/im", (string) $result);
    }