示例#1
0
 public function testCreating()
 {
     $time = $this->tpl('temp.tpl', 'Template 1 a');
     $fenom = new Fenom($provider = new \Fenom\Provider(FENOM_RESOURCES . '/template'));
     $fenom->setCompileDir(FENOM_RESOURCES . '/compile');
     $this->assertInstanceOf('Fenom\\Template', $tpl = $fenom->getTemplate('temp.tpl'));
     $this->assertSame($provider, $tpl->getProvider());
     $this->assertSame('temp.tpl', $tpl->getBaseName());
     $this->assertSame('temp.tpl', $tpl->getName());
     $this->assertSame($time, $tpl->getTime());
     $fenom->clearAllCompiles();
 }