/** * setParent() test */ public function testSetParent() { $parent = new Zend_Server_Reflection_Node('string'); $child = new Zend_Server_Reflection_Node('array'); $child->setParent($parent); $this->assertTrue($parent === $child->getParent()); }
/** * Attach a child node * * @param Zend_Server_Reflection_Node $node * @return void */ public function attachChild(Zend_Server_Reflection_Node $node) { $this->_children[] = $node; if ($node->getParent() !== $this) { $node->setParent($this); } }