From 495b7f279f065331e3f6f2d80efedeeb6ba66571 Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 6 Dec 2011 21:06:45 -0500 Subject: [PATCH] Adding test for #2345 --- .../Test/Case/Network/Http/HttpSocketTest.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php index 996259a59..20da95009 100644 --- a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php +++ b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php @@ -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. *