lithium\tests\cases\net\http\RequestTest::testWithProxy PHP Method

testWithProxy() public method

Tests that creating a Request with a proxy configuration correctly modifies the results of exporting the Request to a stream context configuration.
public testWithProxy ( )
    public function testWithProxy()
    {
        $request = new Request(array('proxy' => 'tcp://proxy.example.com:5100'));
        $expected = array('http' => array('content' => '', 'method' => 'GET', 'header' => array('Host: localhost', 'Connection: Close', 'User-Agent: Mozilla/5.0'), 'protocol_version' => '1.1', 'ignore_errors' => true, 'follow_location' => true, 'request_fulluri' => true, 'proxy' => 'tcp://proxy.example.com:5100'));
        $this->assertEqual($expected, $request->to('context'));
    }