/** * @covers Kunstmaan\NodeBundle\Entity\Node::addNode * @covers Kunstmaan\NodeBundle\Entity\Node::setParent * @covers Kunstmaan\NodeBundle\Entity\Node::getParent */ public function testAddNode() { $child = new Node(); $this->object->addNode($child); $this->assertEquals($this->object, $child->getParent()); $this->assertEquals(1, $this->object->getChildren()->count()); }
/** * Index all children of the specified node (only for the specified * language) * * @param Node $node * @param string $lang */ public function indexChildren(Node $node, $lang) { foreach ($node->getChildren() as $childNode) { $this->indexNode($childNode, $lang); } }