public function testBuild() { $template = new atoum\template(); $this->assert->string($template->getData())->isEmpty()->boolean($template->hasChildren())->isFalse()->object($template->build())->isIdenticalTo($template)->string($template->getData())->isEmpty(); $template = new atoum\template($data = uniqid()); $this->assert->string($template->getData())->isEqualTo($data)->boolean($template->hasChildren())->isFalse()->object($template->build())->isIdenticalTo($template)->string($template->getData())->isEqualTo($data)->object($template->build())->isIdenticalTo($template)->string($template->getData())->isEqualTo($data); $template->addChild($childTemplate = new atoum\template($childData = uniqid())); $this->assert->string($template->getData())->isEqualTo($data)->string($childTemplate->getData())->isEqualTo($childData)->array($template->getChildren())->isIdenticalTo(array($childTemplate))->object($template->build())->isIdenticalTo($template)->string($template->getData())->isEqualTo($data . $childData)->string($childTemplate->getData())->isEqualTo($childData)->object($template->build())->isIdenticalTo($template)->string($template->getData())->isEqualTo($data . $childData . $childData); }