Skip to content

Commit 30a70b7

Browse files
committed
HttpSocket::_configUri() always change config attribute and it is public. This function dont need return it.
1 parent 33bb253 commit 30a70b7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cake/libs/http_socket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ protected function _decodeChunkedBody($body) {
674674
* Parses and sets the specified URI into current request configuration.
675675
*
676676
* @param mixed $uri URI, See HttpSocket::_parseUri()
677-
* @return array Current configuration settings
677+
* @return boolean If uri has merged in config
678678
*/
679679
protected function _configUri($uri = null) {
680680
if (empty($uri)) {
@@ -697,7 +697,7 @@ protected function _configUri($uri = null) {
697697
);
698698
$this->config = Set::merge($this->config, $config);
699699
$this->config = Set::merge($this->config, array_intersect_key($this->config['request']['uri'], $this->config));
700-
return $this->config;
700+
return true;
701701
}
702702

703703
/**

cake/tests/cases/libs/http_socket.test.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ public function testConfigUri() {
290290
)
291291
);
292292
$this->assertEquals($this->Socket->config, $expected);
293-
$this->assertEquals($r, $expected);
293+
$this->assertTrue($r);
294294
$r = $this->Socket->configUri(array('host' => 'www.foo-bar.org'));
295295
$expected['host'] = 'www.foo-bar.org';
296296
$expected['request']['uri']['host'] = 'www.foo-bar.org';
297297
$this->assertEquals($this->Socket->config, $expected);
298-
$this->assertEquals($r, $expected);
298+
$this->assertTrue($r);
299299

300300
$r = $this->Socket->configUri('http://www.foo.com');
301301
$expected = array(
@@ -314,13 +314,13 @@ public function testConfigUri() {
314314
)
315315
);
316316
$this->assertEquals($this->Socket->config, $expected);
317-
$this->assertEquals($r, $expected);
317+
$this->assertTrue($r);
318318
$r = $this->Socket->configUri('/this-is-broken');
319319
$this->assertEquals($this->Socket->config, $expected);
320-
$this->assertEquals($r, false);
320+
$this->assertFalse($r);
321321
$r = $this->Socket->configUri(false);
322322
$this->assertEquals($this->Socket->config, $expected);
323-
$this->assertEquals($r, false);
323+
$this->assertFalse($r);
324324
}
325325

326326
/**

0 commit comments

Comments
 (0)