コード例 #1
0
 public function testSetBlockTheme()
 {
     $theme = 'MyBungle::blocks.html.twig';
     $view = new BlockView();
     $this->innerRenderer->expects($this->once())->method('setTheme')->with($this->identicalTo($view), $theme);
     $this->renderer->setBlockTheme($view, $theme);
 }
コード例 #2
0
 /**
  * @param TwigRendererInterface $innerRenderer
  * @param FormRendererEngineInterface $formRendererEngine
  * @param \Twig_Environment $environment
  */
 public function __construct(TwigRendererInterface $innerRenderer, FormRendererEngineInterface $formRendererEngine, \Twig_Environment $environment)
 {
     $innerRenderer->setEnvironment($environment);
     parent::__construct($innerRenderer, $formRendererEngine);
 }
コード例 #3
0
 public function testSetFormTheme()
 {
     $theme = 'MyBundle::forms.html.twig';
     $this->formRenderer->expects($this->once())->method('addDefaultThemes')->with($theme);
     $this->renderer->setFormTheme($theme);
 }
コード例 #4
0
 /**
  * @param TwigRendererInterface $innerRenderer
  * @param \Twig_Environment     $environment
  */
 public function __construct(TwigRendererInterface $innerRenderer, \Twig_Environment $environment)
 {
     $innerRenderer->setEnvironment($environment);
     parent::__construct($innerRenderer);
 }