示例#1
0
文件: JsonTest.php 项目: raphhh/trex
 /**
  * Tests string conversion.
  */
 public function test__toString()
 {
     $data = array("bar" => "test");
     $json = new Json($data);
     $json->setOptions(JSON_PRETTY_PRINT);
     $this->assertSame(json_encode($data, JSON_PRETTY_PRINT), (string) $json);
 }