Source of file json.php
Size: 0,459 Bytes - Last Modified: 2021-12-23T10:36:37+00:00
/var/www/docs.ssmods.com/process/src/code/thirdparty/disqus-php/disqusapi/tests/json.php
1234567891011121314151617181920212223 | <?php require_once('PHPUnit/Framework.php'); require_once(realpath(dirname(__FILE__).'/../json.php')); class JSONTest extends PHPUnit_Framework_TestCase { public function setUp() { $this->json = new JSON; } public function test_decoding() { $data = '{ "a": false, "b": 1 }'; $set1 = json_decode($data); $set2 = $this->json->unserialize($data); $this->assertEquals($set1->id, $set2->id); $this->assertEquals($set1, $set2); } } ?> |