Ejemplo n.º 1
0
 public function testDeleteChild()
 {
     $template = new atoum\template();
     $template->addChild($childTemplate = new atoum\template());
     $this->assert->object($childTemplate->getParent())->isIdenticalTo($template)->array($template->getChildren())->isIdenticalTo(array($childTemplate))->object($template->deleteChild($childTemplate))->isIdenticalTo($template)->variable($childTemplate->getParent())->isNull()->array($template->getChildren())->isEmpty();
 }
Ejemplo n.º 2
0
 public function testDeleteChild()
 {
     $this->if($this->newTestedInstance, $this->testedInstance->addChild($childTemplate = new atoum\template()))->then->object($childTemplate->getParent())->isTestedInstance->array($this->testedInstance->getChildren())->isIdenticalTo(array($childTemplate))->object($this->testedInstance->deleteChild($childTemplate))->isTestedInstance->variable($childTemplate->getParent())->isNull()->array($this->testedInstance->getChildren())->isEmpty();
 }