Esempio n. 1
0
 /**
  * @group functional
  */
 public function testCache()
 {
     $mustache = new Mustache_Engine(array('template_class_prefix' => '__whot__', 'cache' => self::$tempDir));
     $source = '{{ foo }}';
     $template = $mustache->loadTemplate($source);
     $className = $mustache->getTemplateClassName($source);
     $fileName = self::$tempDir . '/' . $className . '.php';
     $this->assertInstanceOf($className, $template);
     $this->assertFileExists($fileName);
     $this->assertContains("\nclass {$className} extends Mustache_Template", file_get_contents($fileName));
 }
Esempio n. 2
0
 /**
  * @group functional
  */
 public function testCache()
 {
     $mustache = new Mustache_Engine(array('template_class_prefix' => '__whot__', 'cache' => self::$tempDir));
     $source = '{{ foo }}';
     $template = $mustache->loadTemplate($source);
     $className = $mustache->getTemplateClassName($source);
     $this->assertInstanceOf($className, $template);
 }