Esempio n. 1
0
 /**
  * @covers Opt_Class::setup
  * @covers Opt_Class::setInflector
  */
 public function testSetupCDoesNotCreateInitializedInflector()
 {
     $this->_tpl->setInflector($obj = $this->getMock('Opt_Inflector_Interface'));
     $this->_tpl->setup();
     $this->assertSame($obj, $this->_tpl->getInflector());
 }
Esempio n. 2
0
 /**
  * Compiles the specified template and returns the current
  * time.
  *
  * @internal
  * @param String $filename The file name.
  * @return Integer
  */
 public function _compile($filename)
 {
     $compiled = $this->_tpl->getInflector()->getCompiledPath($filename, $this->_inheritance);
     $compiler = $this->_tpl->getCompiler();
     $compiler->setInheritance($this->_inheritance);
     $compiler->setFormatList(array_merge($this->_formatInfo, self::$_globalFormatInfo));
     $compiler->set('branch', $this->_branch);
     $compiler->compile($this->_tpl->_getSource($filename), $filename, $compiled, $this->_mode);
     return time();
 }