Esempio n. 1
0
 public function testGetSetId()
 {
     $t = new Template();
     $this->assertEquals('', $t->getId());
     $t->setId('foo');
     $this->assertEquals('foo', $t->getId());
 }
Esempio n. 2
0
 /**
  * Add template
  *
  * If multiple templates with the same id are added the former is
  * overwritten
  *
  * @param  Template $template
  * @return void
  */
 public function addTemplate(Template $template)
 {
     $id = $template->getId();
     $this->templates[$id] = $template;
 }