示例#1
0
 public function setUp()
 {
     parent::setUp();
     $this->viewHelper = new \TYPO3\Fluid\ViewHelpers\Uri\ExternalViewHelper();
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $this->viewHelper->initializeArguments();
 }
示例#2
0
 public function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\CountViewHelper', array('renderChildren'));
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $this->viewHelper->initializeArguments();
 }
 public function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\Core\\ViewHelper\\AbstractConditionViewHelper', array('getRenderingContext', 'renderChildren', 'hasArgument'));
     $this->viewHelper->expects($this->any())->method('getRenderingContext')->will($this->returnValue($this->renderingContext));
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
 }
示例#4
0
 public function setUp()
 {
     parent::setUp();
     $this->templateVariableContainer = new \TYPO3\Fluid\Core\ViewHelper\TemplateVariableContainer();
     $this->renderingContext->injectTemplateVariableContainer($this->templateVariableContainer);
     $this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\RenderViewHelper', array('dummy'));
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
 }
示例#5
0
 public function setUp()
 {
     parent::setUp();
     $this->templateVariableContainer = new \TYPO3\Fluid\Core\ViewHelper\TemplateVariableContainer(array());
     $this->renderingContext->injectTemplateVariableContainer($this->templateVariableContainer);
     $this->arguments['reverse'] = NULL;
     $this->arguments['key'] = '';
     $this->arguments['iteration'] = NULL;
 }
示例#6
0
 public function setUp()
 {
     parent::setUp();
     $this->cObjBackup = $GLOBALS['TSFE']->cObj;
     $GLOBALS['TSFE']->cObj = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array(), array(), '', FALSE);
     $this->viewHelper = new \TYPO3\Fluid\ViewHelpers\Uri\EmailViewHelper();
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $this->viewHelper->initializeArguments();
 }
示例#7
0
 public function setUp()
 {
     parent::setUp();
     $this->cObjBackup = $GLOBALS['TSFE']->cObj;
     $GLOBALS['TSFE']->cObj = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array(), array(), '', FALSE);
     $this->viewHelper = $this->getMock($this->buildAccessibleProxy('TYPO3\\Fluid\\ViewHelpers\\Link\\EmailViewHelper'), array('renderChildren'));
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $this->viewHelper->initializeArguments();
 }
 public function setUp()
 {
     parent::setUp();
     $this->beUserBackup = isset($GLOBALS['BE_USER']) ? $GLOBALS['BE_USER'] : NULL;
     $GLOBALS['BE_USER'] = new \stdClass();
     $this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\Be\\Security\\IfAuthenticatedViewHelper', array('renderThenChild', 'renderElseChild'));
     $this->viewHelper->expects($this->any())->method('renderThenChild')->will($this->returnValue('then child'));
     $this->viewHelper->expects($this->any())->method('renderElseChild')->will($this->returnValue('else child'));
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $this->viewHelper->initializeArguments();
 }
示例#9
0
 public function setUp()
 {
     parent::setUp();
     $this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
     $GLOBALS['TSFE'] = new \stdClass();
     $GLOBALS['TSFE']->loginUser = 1;
     $GLOBALS['TSFE']->fe_user->groupData = array('uid' => array(1, 2), 'title' => array('Editor', 'OtherRole'));
     $this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\Security\\IfHasRoleViewHelper', array('renderThenChild', 'renderElseChild'));
     $this->viewHelper->expects($this->any())->method('renderThenChild')->will($this->returnValue('then child'));
     $this->viewHelper->expects($this->any())->method('renderElseChild')->will($this->returnValue('else child'));
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $this->viewHelper->initializeArguments();
 }
示例#10
0
 /**
  * @param \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper
  * @return void
  */
 protected function injectDependenciesIntoViewHelper(\TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper)
 {
     $viewHelper->injectConfigurationManager($this->mockConfigurationManager);
     parent::injectDependenciesIntoViewHelper($viewHelper);
 }