コード例 #1
0
ファイル: template.php プロジェクト: andrewolobo/mpTracker
 public function testGetRoot()
 {
     $template = new atoum\template();
     $this->assert->object($template->getRoot())->isIdenticalTo($template);
     $template->addChild($childTemplate = new atoum\template());
     $this->assert->object($template->getRoot())->isIdenticalTo($template)->object($childTemplate->getRoot())->isIdenticalTo($template);
     $childTemplate->addChild($littleChildTemplate = new atoum\template());
     $this->assert->object($template->getRoot())->isIdenticalTo($template)->object($childTemplate->getRoot())->isIdenticalTo($template)->object($littleChildTemplate->getRoot())->isIdenticalTo($template);
 }
コード例 #2
0
ファイル: template.php プロジェクト: xihewang/atoum
 public function testGetRoot()
 {
     $this->if($this->newTestedInstance)->then->object($this->testedInstance->getRoot())->isTestedInstance->if($this->testedInstance->addChild($childTemplate = new atoum\template()))->then->object($this->testedInstance->getRoot())->isTestedInstance->object($childTemplate->getRoot())->isTestedInstance->if($childTemplate->addChild($littleChildTemplate = new atoum\template()))->then->object($this->testedInstance->getRoot())->isTestedInstance->object($childTemplate->getRoot())->isTestedInstance->object($littleChildTemplate->getRoot())->isTestedInstance;
 }