作者:robertlemk
项目:flow-development-collectio
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock(\TYPO3\Fluid\ViewHelpers\IfViewHelper::class, array('renderThenChild', 'renderElseChild'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:cerleste
项目:flow-development-collectio
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getMockBuilder(\TYPO3\Fluid\ViewHelpers\Format\HtmlentitiesDecodeViewHelper::class)->setMethods(array('renderChildren'))->getMock();
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:cerleste
项目:flow-development-collectio
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock(\TYPO3\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);
}
作者:sokunthearit
项目:Intern-Project-Week-
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getMock('TYPO3\\Fluid\\ViewHelpers\\Format\\JsonViewHelper', array('renderChildren'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:cerleste
项目:flow-development-collectio
public function setUp()
{
parent::setUp();
$this->viewHelper = new \TYPO3\Fluid\ViewHelpers\Uri\ActionViewHelper();
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:sakona99
项目:flow-logi
/**
*/
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\Validation\\IfHasErrorsViewHelper', array('renderThenChild', 'renderElseChild'));
$this->inject($this->viewHelper, 'controllerContext', $this->controllerContext);
//$this->inject($this->ifAccessViewHelper, 'accessDecisionManager', $this->mockAccessDecisionManager);
}
作者:sokunthearit
项目:Intern-Project-Week-
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\Link\\EmailViewHelper', array('renderChildren'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:robertlemk
项目:flow-development-collectio
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getMock(\TYPO3\Fluid\ViewHelpers\CycleViewHelper::class, array('renderChildren'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:cerleste
项目:flow-development-collectio
/**
* Sets up this test case
*/
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock(\TYPO3\Fluid\ViewHelpers\Format\IdentifierViewHelper::class, array('renderChildren'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->mockPersistenceManager = $this->createMock(\TYPO3\Flow\Persistence\PersistenceManagerInterface::class);
$this->viewHelper->_set('persistenceManager', $this->mockPersistenceManager);
}
作者:robertlemk
项目:flow-development-collectio
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::class, array('dummy'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
}
作者:robertlemk
项目:flow-development-collectio
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;
}
作者:sengkimlon
项目:Flow3-Authentificatio
public function setUp()
{
parent::setUp();
$this->translateViewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\TranslateViewHelper', array('renderChildren'));
$this->request->expects($this->any())->method('getControllerPackageKey')->will($this->returnValue('TYPO3.Fluid'));
$this->dummyLocale = new Locale('de_DE');
$this->mockTranslator = $this->getMockBuilder('TYPO3\\Flow\\I18n\\Translator')->disableOriginalConstructor()->getMock();
$this->inject($this->translateViewHelper, 'translator', $this->mockTranslator);
$this->injectDependenciesIntoViewHelper($this->translateViewHelper);
}
作者:animaltoo
项目:webinterfac
/**
* @param \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper
*/
protected function injectDependenciesIntoViewHelper(\TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper)
{
$this->hashService = $this->getMock('TYPO3\\Flow\\Security\\Cryptography\\HashService');
$this->inject($viewHelper, 'hashService', $this->hashService);
$this->mvcPropertyMappingConfigurationService = $this->getMock('TYPO3\\Flow\\Mvc\\Controller\\MvcPropertyMappingConfigurationService');
$this->inject($viewHelper, 'mvcPropertyMappingConfigurationService', $this->mvcPropertyMappingConfigurationService);
$this->securityContext = $this->getMock('TYPO3\\Flow\\Security\\Context');
$this->inject($viewHelper, 'securityContext', $this->securityContext);
parent::injectDependenciesIntoViewHelper($viewHelper);
}
作者:cerleste
项目:flow-development-collectio
public function setUp()
{
parent::setUp();
$this->mockResourceManager = $this->createMock(\TYPO3\Flow\Resource\ResourceManager::class);
$this->mockI18nService = $this->createMock(\TYPO3\Flow\I18n\Service::class);
$this->viewHelper = $this->getAccessibleMock(\TYPO3\Fluid\ViewHelpers\Uri\ResourceViewHelper::class, array('renderChildren'), array(), '', false);
$this->inject($this->viewHelper, 'resourceManager', $this->mockResourceManager);
$this->inject($this->viewHelper, 'i18nService', $this->mockI18nService);
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:sengkimlon
项目:Flow3-Authentificatio
public function setUp()
{
parent::setUp();
$this->mockResourceManager = $this->getMock('TYPO3\\Flow\\Resource\\ResourceManager');
$this->mockI18nService = $this->getMock('TYPO3\\Flow\\I18n\\Service');
$this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\Uri\\ResourceViewHelper', array('renderChildren'), array(), '', FALSE);
$this->inject($this->viewHelper, 'resourceManager', $this->mockResourceManager);
$this->inject($this->viewHelper, 'i18nService', $this->mockI18nService);
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
作者:robertlemk
项目:flow-development-collectio
/**
* @param \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper
*/
protected function injectDependenciesIntoViewHelper(\TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper)
{
$this->hashService = $this->getMock(\TYPO3\Flow\Security\Cryptography\HashService::class);
$this->inject($viewHelper, 'hashService', $this->hashService);
$this->mvcPropertyMappingConfigurationService = $this->getMock(\TYPO3\Flow\Mvc\Controller\MvcPropertyMappingConfigurationService::class);
$this->inject($viewHelper, 'mvcPropertyMappingConfigurationService', $this->mvcPropertyMappingConfigurationService);
$this->securityContext = $this->getMock(\TYPO3\Flow\Security\Context::class);
$this->inject($viewHelper, 'securityContext', $this->securityContext);
$this->mockAuthenticationManager = $this->getMock(\TYPO3\Flow\Security\Authentication\AuthenticationManagerInterface::class);
$this->inject($viewHelper, 'authenticationManager', $this->mockAuthenticationManager);
parent::injectDependenciesIntoViewHelper($viewHelper);
}
作者:mgoldbec
项目:neos-development-collectio
/**
* @param AbstractViewHelper $viewHelper
* @return void
*/
protected function injectDependenciesIntoViewHelper(AbstractViewHelper $viewHelper)
{
parent::injectDependenciesIntoViewHelper($viewHelper);
$templateVariables = $this->templateVariables;
$this->templateVariableContainer->expects($this->any())->method('exists')->will($this->returnCallback(function ($variableName) use($templateVariables) {
return isset($templateVariables[$variableName]);
}));
$this->templateVariableContainer->expects($this->any())->method('get')->will($this->returnCallback(function ($variableName) use($templateVariables) {
return $templateVariables[$variableName];
}));
}
作者:cerleste
项目:flow-development-collectio
public function setUp()
{
parent::setUp();
$this->mockViewHelper = $this->getMockBuilder(\TYPO3\Fluid\ViewHelpers\Security\IfHasRoleViewHelper::class)->setMethods(array('renderThenChild', 'renderElseChild', 'hasAccessToPrivilege'))->getMock();
}
作者:animaltoo
项目:webinterfac
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getMockBuilder('TYPO3\\Fluid\\ViewHelpers\\Form\\ValidationResultsViewHelper')->setMethods(array('renderChildren'))->getMock();
$this->injectDependenciesIntoViewHelper($this->viewHelper);
}
作者:cerleste
项目:flow-development-collectio
/**
*/
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getMockBuilder(\TYPO3\Fluid\ViewHelpers\RenderChildrenViewHelper::class)->setMethods(array('renderChildren'))->getMock();
}