/**
  * @param string $argumentsName
  * @param string $closureName
  * @param string $initializationPhpCode
  * @param ViewHelperNode $node
  * @param TemplateCompiler $compiler
  * @return null
  */
 public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler)
 {
     // @TODO: replace with a true compiling method to make compilable!
     $compiler->disable();
     return null;
 }
 /**
  * @param string $argumentsName
  * @param string $closureName
  * @param string $initializationPhpCode
  * @param ViewHelperNode $node
  * @param TemplateCompiler $compiler
  * @return string
  */
 public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler)
 {
     $compiler->disable();
     return "''";
 }
Ejemplo n.º 3
0
 /**
  * @test
  */
 public function testSupportsDisablingCompiler()
 {
     $instance = new TemplateCompiler();
     $this->setExpectedException(StopCompilingException::class);
     $instance->disable();
 }
Ejemplo n.º 4
0
 /**
  * @test
  */
 public function testStoreWhenDisabledFlushesCache()
 {
     $cache = $this->getMock('TYPO3Fluid\\Fluid\\Core\\Cache\\SimpleFileCache', array('flush', 'store'));
     $cache->expects($this->never())->method('store');
     $cache->expects($this->once())->method('flush')->with('fakeidentifier');
     $state = new ParsingState();
     $instance = new TemplateCompiler();
     $instance->disable();
     $instance->setTemplateCache($cache);
     $instance->store('fakeidentifier', $state);
 }