From 7ea2f5f750a289532e5773069c81481ec524df14 Mon Sep 17 00:00:00 2001 From: thefosk Date: Wed, 8 Jan 2014 18:50:12 -0800 Subject: [PATCH] closes #26 --- test/Unirest/UnirestTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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" ),