public function testJsonDecorator()
 {
     // Wrap service with a JSON decorator for renderers
     $service = new Decorator\RenderInJson($this->service);
     // Our Renderer will now output JSON instead of an array
     $this->assertEquals('{"foo":"bar"}', $service->renderData());
 }
Example #2
0
 public function testJsonDecorator()
 {
     // Wrap service with a JSON decorator for renderers
     $service = new Decorator\RenderInJson($this->service);
     // Our Renderer will now output JSON instead of an array
     return $service->renderData();
 }