Esempio n. 1
0
 /**
  * Tests Json::write
  */
 public function testWrite()
 {
     $json = new Json();
     $json->setup(['target' => 'php://output']);
     ob_flush();
     ob_start();
     $json->write(['foo' => 'bar']);
     $output = ob_get_clean();
     $this->assertEquals('{"foo":"bar"}', $output);
 }