/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem(array(__DIR__ . '/../../Resources/views/Form'))); $this->twig->addExtension(new CKEditorExtension($this->helper)); $this->template = $this->twig->loadTemplate('ckeditor_widget.html.twig'); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->phpEngine = new PhpEngine(new TemplateNameParser(), new FilesystemLoader(__DIR__ . '/../../Resources/views/Form/%name%')); $this->formHelperMock = $this->getMockBuilder('Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\FormHelper')->disableOriginalConstructor()->getMock(); $this->formHelperMock->expects($this->any())->method('getName')->will($this->returnValue('form')); $this->phpEngine->addHelpers(array($this->formHelperMock, new CKEditorHelper($this->containerMock))); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->formHelperMock = $this->getMockBuilder('Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\FormHelper')->disableOriginalConstructor()->getMock(); $this->phpEngine = new PhpEngine(new TemplateNameParser(), new FilesystemLoader(array(__DIR__ . '/../../Resources/views/Form/%name%')), array('form' => $this->formHelperMock, $this->helper)); }