本文整理汇总了PHP中TYPO3\Fluid\ViewHelpers\ViewHelperBaseTestcase类的典型用法代码示例。如果您正苦于以下问题:PHP ViewHelperBaseTestcase类的具体用法?PHP ViewHelperBaseTestcase怎么用?PHP ViewHelperBaseTestcase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ViewHelperBaseTestcase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock(\TYPO3\Fluid\ViewHelpers\IfViewHelper::class, array('renderThenChild', 'renderElseChild'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
示例2: setUp
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();
}
示例3: setUp
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);
}
示例4: setUp
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getMock('TYPO3\\Fluid\\ViewHelpers\\Format\\JsonViewHelper', array('renderChildren'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
示例5: setUp
public function setUp()
{
parent::setUp();
$this->viewHelper = new \TYPO3\Fluid\ViewHelpers\Uri\ActionViewHelper();
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
示例6: setUp
/**
*/
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);
}
示例7: setUp
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock('TYPO3\\Fluid\\ViewHelpers\\Link\\EmailViewHelper', array('renderChildren'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
示例8: setUp
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getMock(\TYPO3\Fluid\ViewHelpers\CycleViewHelper::class, array('renderChildren'));
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
示例9: setUp
/**
* 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);
}
示例10: setUp
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);
}
示例11: setUp
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;
}
示例12: setUp
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);
}
示例13: injectDependenciesIntoViewHelper
/**
* @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);
}
示例14: setUp
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();
}
示例15: setUp
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();
}