Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: eb35c68fe4
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (15 sloc) 0.463 kb
* Unit-test clJsonNode implementation of clNode.
class JsonNodeApiTests extends UnitTestCase {
* Make sure my understanding of json_decode is spot-on
function testJsonDecode() {
$json = '{"key":"value"}';
$this->assertEqual((object) array('key' => 'value'), json_decode($json));
$json = '[{"key":"value"}]';
$this->assertEqual(array((object) array('key' => 'value')), json_decode($json));
Jump to Line
Something went wrong with that request. Please try again.