Permalink
Browse files

Adding test for #2345

  • Loading branch information...
1 parent e7a7e57 commit 495b7f279f065331e3f6f2d80efedeeb6ba66571 @markstory markstory committed Dec 7, 2011
Showing with 20 additions and 0 deletions.
  1. +20 −0 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
@@ -549,6 +549,26 @@ public function testRequest() {
}
/**
+ * 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

0 comments on commit 495b7f2

Please sign in to comment.