Skip to content

Commit fadcbf1

Browse files
committed
Merge pull request php-curl-class#155 from zachborboa/master
Add test for php-curl-class#154
2 parents 2f77563 + bf10280 commit fadcbf1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/PHPCurlClass/PHPCurlClassTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,22 @@ public function testCaseInsensitiveArraySet()
6464
$this->assertCount(2, $array);
6565
}
6666

67+
public function testBuildPostDataArgSeparator()
68+
{
69+
$data = array(
70+
'foo' => 'Hello',
71+
'bar' => 'World',
72+
);
73+
74+
foreach (array(false, '&', '&') as $arg_separator) {
75+
if ($arg_separator) {
76+
ini_set('arg_separator.output', $arg_separator);
77+
}
78+
$curl = new Curl();
79+
$this->assertEquals('foo=Hello&bar=World', $curl->buildPostData($data));
80+
}
81+
}
82+
6783
public function testUserAgent()
6884
{
6985
$php_version = 'PHP\/' . PHP_VERSION;

0 commit comments

Comments
 (0)