Adding test for #2345

This commit is contained in:
mark_story 2011-12-06 21:06:45 -05:00
parent e7a7e57ba6
commit 495b7f279f

View file

@ -548,6 +548,26 @@ class HttpSocketTest extends CakeTestCase {
$this->assertEquals($this->Socket->request['body'], "name=HttpSocket-is-released&date=today");
}
/**
* Test the scheme + port keys
*
* @return void
*/
public function testGetWithSchemeAndPort() {
$this->Socket->reset();
$request = array(
'uri' => array(
'scheme' => 'http',
'host' => 'cakephp.org',
'port' => 8080,
'path' => '/',
),
'method' => 'GET'
);
$response = $this->Socket->request($request);
$this->assertContains('Host: cakephp.org:8080', $this->Socket->request['header']);
}
/**
* The "*" asterisk character is only allowed for the following methods: OPTIONS.
*