Example #1
0
 /**
  * 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);
     }
 }
Example #2
0
 /**
  * getEndPoints() test
  */
 public function testGetEndPoints()
 {
     $root = new Zend_Server_Reflection_Node('root');
     $child1 = $root->createChild('child1');
     $child2 = $root->createChild('child2');
     $child1grand1 = $child1->createChild(null);
     $child1grand2 = $child1->createChild('child1grand2');
     $child2grand1 = $child2->createChild('child2grand1');
     $child2grand2 = $child2->createChild('child2grand2');
     $child2grand2great1 = $child2grand2->createChild(null);
     $child2grand2great2 = $child2grand2->createChild('child2grand2great2');
     $endPoints = $root->getEndPoints();
     $endPointsArray = array();
     foreach ($endPoints as $endPoint) {
         $endPointsArray[] = $endPoint->getValue();
     }
     $test = array('child1', 'child1grand2', 'child2grand1', 'child2grand2', 'child2grand2great2');
     $this->assertTrue($test === $endPointsArray, 'Test was [' . var_export($test, 1) . ']; endPoints were [' . var_export($endPointsArray, 1) . ']');
 }