Browse Source

Adding test for #2345

mark_story 14 years ago
parent
commit
495b7f279f
1 changed files with 20 additions and 0 deletions
  1. 20 0
      lib/Cake/Test/Case/Network/Http/HttpSocketTest.php

+ 20 - 0
lib/Cake/Test/Case/Network/Http/HttpSocketTest.php

@@ -549,6 +549,26 @@ class HttpSocketTest extends CakeTestCase {
 	}
 
 /**
+ * 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.
  *
  * @expectedException SocketException