Esempio n. 1
0
 public function testAddChild()
 {
     $c1 = new MenuNode();
     $c2 = new MenuNode();
     $m = new MenuNode();
     $m->addChild($c1);
     $ret = $m->addChild($c2);
     $children = $m->getChildren();
     $this->assertCount(2, $children);
     $this->assertSame($m, $children[0]->getParentDocument());
     $this->assertSame($c2, $ret);
 }