public function setUp() { parent::setUp(); $this->viewHelper = new \TYPO3\CMS\Fluid\ViewHelpers\Uri\ExternalViewHelper(); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
public function setUp() { parent::setUp(); $this->fixture = $this->getAccessibleMock(SplitViewHelper::class, ['renderChildren']); $this->injectDependenciesIntoViewHelper($this->fixture); $this->fixture->initializeArguments(); }
public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock('Tx_MooxNews_ViewHelpers_Format_FileDownloadViewHelper', array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\IfViewHelper', array('renderThenChild', 'renderElseChild')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $this->templateVariableContainer = new \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer(); $this->renderingContext->injectTemplateVariableContainer($this->templateVariableContainer); $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::class, array('dummy')); $this->injectDependenciesIntoViewHelper($this->viewHelper); }
public function setUp() { parent::setUp(); $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\CaseViewHelper', array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock('Tx_News_ViewHelpers_Be_Security_IfAccessToTableIsAllowedViewHelper', array('renderThenChild', 'renderElseChild')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\StripTagsViewHelper::class, array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
/** * Set up */ public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock('Tx_MooxNews_ViewHelpers_SimplePrevNextViewHelper', array('dummy')); $mockedDatabaseConnection = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('exec_SELECTgetSingleRow')); $this->viewHelper->_set('databaseConnection', $mockedDatabaseConnection); }
/** */ public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock(VideoViewHelper::class, ['renderChildren']); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $this->viewHelper = new ExternalViewHelper(); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper::class, array('getRenderingContext', 'renderChildren', 'hasArgument')); $this->viewHelper->expects($this->any())->method('getRenderingContext')->will($this->returnValue($this->renderingContext)); $this->injectDependenciesIntoViewHelper($this->viewHelper); }
protected function setUp() { parent::setUp(); $this->viewHelper = $this->getMock(Nl2brViewHelper::class, array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
/** * Set up */ public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock('GeorgRinger\\News\\ViewHelpers\\SimplePrevNextViewHelper', ['dummy']); $mockedDatabaseConnection = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', ['exec_SELECTgetSingleRow']); $this->viewHelper->_set('databaseConnection', $mockedDatabaseConnection); }
public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock('GeorgRinger\\News\\ViewHelpers\\Format\\FileDownloadViewHelper', array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
/** * setUp function */ protected function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Link\PageViewHelper::class, array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
public function setUp() { parent::setUp(); $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array('dummy')); $this->viewHelper = $this->getAccessibleMock('GeorgRinger\\News\\ViewHelpers\\Be\\Security\\IfAccessToTableIsAllowedViewHelper', array('renderThenChild', 'renderElseChild')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper::class, array('buildRenderChildrenClosure')); $this->viewHelper->expects($this->any())->method('buildRenderChildrenClosure')->will($this->returnValue(function () { return 'ChildNodes'; })); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $this->templateVariableContainer = new \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer(array()); $this->renderingContext->injectTemplateVariableContainer($this->templateVariableContainer); $this->arguments['reverse'] = null; $this->arguments['key'] = ''; $this->arguments['iteration'] = null; }
public function setUp() { parent::setUp(); $GLOBALS['TSFE'] = new \stdClass(); $GLOBALS['TSFE']->cObj = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array(), array(), '', FALSE); $this->viewHelper = $this->getMock($this->buildAccessibleProxy('TYPO3\\CMS\\Fluid\\ViewHelpers\\Link\\EmailViewHelper'), array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $GLOBALS['TSFE'] = new \stdClass(); $GLOBALS['TSFE']->cObj = $this->getMock(ContentObjectRenderer::class, array(), array(), '', false); $this->viewHelper = new EmailViewHelper(); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $GLOBALS['TSFE'] = new \stdClass(); $GLOBALS['TSFE']->cObj = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, array(), array(), '', false); $this->viewHelper = $this->getMock($this->buildAccessibleProxy(\TYPO3\CMS\Fluid\ViewHelpers\Link\EmailViewHelper::class), array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
public function setUp() { parent::setUp(); $GLOBALS['TSFE'] = new \stdClass(); $GLOBALS['TSFE']->cObj = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array(), array(), '', FALSE); $this->viewHelper = new \TYPO3\CMS\Fluid\ViewHelpers\Uri\EmailViewHelper(); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
/** * */ public function setUp() { parent::setUp(); $this->viewHelper = $this->getAccessibleMock('Pws\\KesearchCategories\\ViewHelpers\\Link\\CategorySearchLinkViewHelper', array('renderChildren')); $this->filterRepository = $this->getMock('Pws\\KesearchCategories\\Domain\\Repository\\FilterRepository', array('findOneByCategories'), array(), '', false); $this->inject($this->viewHelper, 'filterRepository', $this->filterRepository); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
/** * Set up */ public function setUp() { parent::setUp(); $this->pageRenderer = $this->getAccessibleMock('TYPO3\\CMS\\Core\\Page\\PageRenderer', array('dummy'), array(), '', FALSE); $GLOBALS['TSFE'] = $this->getAccessibleMock('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', array('getPageRenderer'), array(), '', FALSE); $GLOBALS['TSFE']->_set('pageRenderer', $this->pageRenderer); $GLOBALS['TSFE']->expects($this->any())->method('getPageRenderer')->will($this->returnValue($this->pageRenderer)); $this->viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_News_ViewHelpers_MetaTagViewHelper'), array('renderChildren')); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $GLOBALS['TSFE'] = new \stdClass(); $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Security\IfAuthenticatedViewHelper::class, 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(); }
protected function setUp() { parent::setUp(); $GLOBALS['BE_USER'] = new \stdClass(); $GLOBALS['BE_USER']->userGroups = array(array('uid' => 1, 'title' => 'Editor'), array('uid' => 2, 'title' => 'OtherRole')); $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Be\Security\IfHasRoleViewHelper::class, 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(); }
protected function setUp() { parent::setUp(); // XXX: This is bad from a testing POV but the only option right now $reflectionClass = new \ReflectionClass(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::class); $property = $reflectionClass->getProperty('configurationManager'); $property->setAccessible(TRUE); $property->setValue($this->getMock(ConfigurationManagerInterface::class)); $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\BytesViewHelper::class, array('renderChildren')); $this->injectDependenciesIntoViewHelper($this->viewHelper); $this->viewHelper->initializeArguments(); }
protected function setUp() { parent::setUp(); $GLOBALS['TSFE'] = new \stdClass(); $GLOBALS['TSFE']->loginUser = 1; $GLOBALS['TSFE']->fe_user = new \stdClass(); $GLOBALS['TSFE']->fe_user->groupData = array('uid' => array(1, 2), 'title' => array('Editor', 'OtherRole')); $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Security\IfHasRoleViewHelper::class, 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(); }
/** * Sets up this test case * * @return void */ protected function setUp() { parent::setUp(); /** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue|\PHPUnit_Framework_MockObject_MockObject $mockFlashMessagingQueue */ $mockFlashMessagingQueue = $this->getMock(\TYPO3\CMS\Core\Messaging\FlashMessageQueue::class, array('getAllMessagesAndFlush'), array('foo')); $mockFlashMessagingQueue->expects($this->once())->method('getAllMessagesAndFlush')->will($this->returnValue(array())); $this->mockFlashMessagingQueue = $mockFlashMessagingQueue; $this->controllerContext->expects($this->any())->method('getFlashMessageQueue')->will($this->returnValue($mockFlashMessagingQueue)); $this->mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class); $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FlashMessagesViewHelper::class, array('dummy')); $this->viewHelper->_set('tag', $this->mockTagBuilder); $this->viewHelper->setRenderingContext($this->renderingContext); $this->viewHelper->initialize(); }