Merge pull request #155 from zachborboa/master

Add test for #154
This commit is contained in:
Zach Borboa
2015-03-26 08:44:42 -07:00
+16
View File
@@ -64,6 +64,22 @@ class CurlTest extends PHPUnit_Framework_TestCase
$this->assertCount(2, $array);
}
public function testBuildPostDataArgSeparator()
{
$data = array(
'foo' => 'Hello',
'bar' => 'World',
);
foreach (array(false, '&', '&') as $arg_separator) {
if ($arg_separator) {
ini_set('arg_separator.output', $arg_separator);
}
$curl = new Curl();
$this->assertEquals('foo=Hello&bar=World', $curl->buildPostData($data));
}
}
public function testUserAgent()
{
$php_version = 'PHP\/' . PHP_VERSION;