mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Minor optimizations.
This commit is contained in:
parent
d656bdae3b
commit
7c23d289e0
2 changed files with 4 additions and 5 deletions
|
@ -321,7 +321,7 @@ class HttpSocket extends CakeSocket {
|
||||||
$response .= $data;
|
$response .= $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($connectionType == 'close') {
|
if ($connectionType === 'close') {
|
||||||
$this->disconnect();
|
$this->disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -251,13 +251,12 @@ class HttpSocketTest extends CakeTestCase {
|
||||||
$baseConfig['host'] = 'foo-bar';
|
$baseConfig['host'] = 'foo-bar';
|
||||||
$baseConfig['protocol'] = getprotobyname($baseConfig['protocol']);
|
$baseConfig['protocol'] = getprotobyname($baseConfig['protocol']);
|
||||||
$this->assertEquals($this->Socket->config, $baseConfig);
|
$this->assertEquals($this->Socket->config, $baseConfig);
|
||||||
|
|
||||||
$this->Socket->reset();
|
$this->Socket->reset();
|
||||||
$baseConfig = $this->Socket->config;
|
$baseConfig = $this->Socket->config;
|
||||||
$this->Socket->__construct('http://www.cakephp.org:23/');
|
$this->Socket->__construct('http://www.cakephp.org:23/');
|
||||||
$baseConfig['host'] = 'www.cakephp.org';
|
$baseConfig['host'] = $baseConfig['request']['uri']['host'] = 'www.cakephp.org';
|
||||||
$baseConfig['request']['uri']['host'] = 'www.cakephp.org';
|
$baseConfig['port'] = $baseConfig['request']['uri']['port'] = 23;
|
||||||
$baseConfig['port'] = 23;
|
|
||||||
$baseConfig['request']['uri']['port'] = 23;
|
|
||||||
$baseConfig['protocol'] = getprotobyname($baseConfig['protocol']);
|
$baseConfig['protocol'] = getprotobyname($baseConfig['protocol']);
|
||||||
$this->assertEquals($this->Socket->config, $baseConfig);
|
$this->assertEquals($this->Socket->config, $baseConfig);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue