mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Adding test for #2345
This commit is contained in:
parent
e7a7e57ba6
commit
495b7f279f
1 changed files with 20 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue