public function test_withList()
 {
     $actual = $this->testMe->toArray(new WithList());
     $list = array(array('inParent' => 'oh yes indeed', 'child' => SimpleNoChildren::toArray()));
     $this->assertArrayHasKey('list', $actual);
     $this->assertEquals($list, $actual['list']);
 }
Пример #2
0
 public function render($template, $data = null)
 {
     $this->viewModel = $this->data['vm'];
     $data = $this->objectToArrayHelper->toArray($this->viewModel);
     print json_encode($data, JSON_HEX_QUOT | JSON_BIGINT_AS_STRING | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
 }