You are here

public function JSONTest::test_decoding in Drupal Most Popular 7

File

modules/mostpopular_disqus/disqusapi/tests/json.php, line 11

Class

JSONTest

Code

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);
}