public function testJson() { $view = new View(); $view->foo = 'bar'; $view->baz = 'qux'; $view = json_decode(json_encode($view)); $this->assertEquals('bar', $view->foo); $this->assertEquals('qux', $view->baz); }