Example #1
0
 public function test_render()
 {
     $collection = new Collection('test', $this->mockTypeFactory, array('is_child' => true));
     $collection->addTypeName('test');
     $collection->setRev('test:rev');
     $parent = array('id' => 'parent_id', 'children' => array(array('id' => 'child1')));
     $this->parentController->test = $collection;
     $entity = $this->parentController->createWithObject($parent);
     $this->assertEquals("<div xmlns:test=\"http://test.org/\" about=\"parent_id\"><div rev=\"test:rev\"><div about=\"child1\"></div>\n</div>\n</div>\n", $entity->render());
 }