Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
2  net/socket/Curl.php
@@ -188,7 +188,7 @@ public function set($flags, $value = null) {
188 188 if ($value !== null) {
189 189 $flags = array($flags => $value);
190 190 }
191   - $this->options += $flags;
  191 + $this->options = $flags + $this->options;
192 192 }
193 193 }
194 194
7 tests/cases/net/socket/CurlTest.php
@@ -131,6 +131,13 @@ public function testSendWithObject() {
131 131 $this->assertTrue($result instanceof \lithium\net\http\Response);
132 132 $this->assertPattern("/^HTTP/", (string) $result);
133 133 }
  134 +
  135 + public function testSettingOfOptions() {
  136 + $stream = new Curl($this->_testConfig);
  137 + $stream->set('DummyFlag', 'Dummy Value');
  138 + $stream->set('DummyFlag', 'Changed Dummy Value');
  139 + $this->assertEqual('Changed Dummy Value', $stream->options['DummyFlag']);
  140 + }
134 141 }
135 142
136 143 ?>

0 comments on commit 1924a92

Please sign in to comment.
Something went wrong with that request. Please try again.