You are here

class JSONTest in Drupal Most Popular 7

Hierarchy

  • class \JSONTest extends \PHPUnit_Framework_TestCase

Expanded class hierarchy of JSONTest

File

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

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

}

Members