Skip to content

Commit

Permalink
Adding test for #2345
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 7, 2011
1 parent e7a7e57 commit 495b7f2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
Expand Up @@ -548,6 +548,26 @@ public function testRequest() {
$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.
*
Expand Down

0 comments on commit 495b7f2

Please sign in to comment.