示例#1
0
 /**
  * {@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');
 }
示例#2
0
 /**
  * {@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)));
 }
示例#3
0
 /**
  * {@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));
 }