diff --git a/test/Unirest/UnirestTest.php b/test/Unirest/UnirestTest.php index 68b05ff..b97d042 100644 --- a/test/Unirest/UnirestTest.php +++ b/test/Unirest/UnirestTest.php @@ -16,6 +16,20 @@ class UnirestTest extends UnitTestCase $this->assertEqual("thefosk", $args->nick); } + public function testGetMultidimensionalArray() + { + $response = Unirest::get("http://httpbin.org/get", array( "Accept" => "application/json" ), + array('key'=>'value','items'=>array('item1','item2'))); + + $this->assertEqual(200, $response->code); + + $args = $response->body->args; + print_r($args); + + $this->assertEqual("Mark", $args->{"user.name"}); + $this->assertEqual("thefosk", $args->nick); + } + public function testGetWithDots() { $response = Unirest::get("http://httpbin.org/get", array( "Accept" => "application/json" ),