Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #292 from mackstar/issue-214

Fix and test for issue #214
  • Loading branch information...
commit 1924a92783387430fe284d8d6e4716cedcc5ec08 2 parents cfa7f9b + 91c0798
GWoo gwoo authored
Showing with 8 additions and 1 deletion.
  1. +1 −1  net/socket/Curl.php
  2. +7 −0 tests/cases/net/socket/CurlTest.php
2  net/socket/Curl.php
View
@@ -188,7 +188,7 @@ public function set($flags, $value = null) {
if ($value !== null) {
$flags = array($flags => $value);
}
- $this->options += $flags;
+ $this->options = $flags + $this->options;
}
}
7 tests/cases/net/socket/CurlTest.php
View
@@ -131,6 +131,13 @@ public function testSendWithObject() {
$this->assertTrue($result instanceof \lithium\net\http\Response);
$this->assertPattern("/^HTTP/", (string) $result);
}
+
+ public function testSettingOfOptions() {
+ $stream = new Curl($this->_testConfig);
+ $stream->set('DummyFlag', 'Dummy Value');
+ $stream->set('DummyFlag', 'Changed Dummy Value');
+ $this->assertEqual('Changed Dummy Value', $stream->options['DummyFlag']);
+ }
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.