[TASK] Use name-resolution instead of strings where possible: 4 57/34857/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Dec 2014 12:47:51 +0000 (13:47 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 2 Dec 2014 02:13:49 +0000 (03:13 +0100)
(part for EXT:fluid)

Use name-resolution with ...::class instead of strings where
possible.
(needs PHP 5.5, which is meanwhile required for master)

Change-set Iedbb896607adddce2b23ab67f990fa2296c0d1bb
first introduced usage of ::class in master. We now add it
in various more places.

Change-Id: Ie7d0334957047876cdf566113c0a6b84f6994e38
Resolves: #63477
Releases: master
Reviewed-on: http://review.typo3.org/34857
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
89 files changed:
typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php
typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php
typo3/sysext/fluid/Classes/Service/AbstractGenerator.php
typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
typo3/sysext/fluid/Classes/ViewHelpers/CaseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/SwitchViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/BooleanNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/NumericNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractConditionViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractTagBasedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TagBuilderTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetControllerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AjaxWidgetContextHolderTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestBuilderTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestHandlerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestTest.php
typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php
typo3/sysext/fluid/Tests/Unit/View/StandaloneViewTest.php
typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CountViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FlashMessagesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/ButtonViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/FormFieldViewHelperBaseTestcase.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/PasswordViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/BytesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesDecodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlspecialcharsViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/RawViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/StripTagsViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/PageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/TypolinkViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderChildrenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/SwitchViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php
typo3/sysext/fluid/ext_localconf.php

index da97bfc..0b83322 100644 (file)
@@ -43,7 +43,7 @@ class DocbookGeneratorService extends \TYPO3\CMS\Fluid\Service\DocbookGenerator
                $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
                $this->injectDocCommentParser($this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\DocCommentParser::class));
                $this->injectReflectionService($this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class));
-               return $this->generateDocbook('TYPO3\CMS\Fluid\ViewHelpers');
+               return $this->generateDocbook(\TYPO3\CMS\Fluid\ViewHelpers::class);
        }
 
        /**
index 62c6066..b0b3a9d 100644 (file)
@@ -267,7 +267,7 @@ EOD;
        protected function convertObjectAccessorNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode $node) {
                return array(
                        'initialization' => '',
-                       'execution' => sprintf('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode::getPropertyPath($renderingContext->getTemplateVariableContainer(), \'%s\', $renderingContext)', $node->getObjectPath())
+                       'execution' => sprintf(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class . '::getPropertyPath($renderingContext->getTemplateVariableContainer(), \'%s\', $renderingContext)', $node->getObjectPath())
                );
        }
 
@@ -348,14 +348,14 @@ EOD;
 
                        return array(
                                'initialization' => $initializationPhpCode . $convertedLeftSide['initialization'] . $convertedRightSide['initialization'],
-                               'execution' => sprintf('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\BooleanNode::evaluateComparator(\'%s\', %s, %s)', $node->getComparator(), $convertedLeftSide['execution'], $convertedRightSide['execution'])
+                               'execution' => sprintf(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode::class . '::evaluateComparator(\'%s\', %s, %s)', $node->getComparator(), $convertedLeftSide['execution'], $convertedRightSide['execution'])
                        );
                } else {
                        // simple case, no comparator.
                        $converted = $this->convert($node->getSyntaxTreeNode());
                        return array(
                                'initialization' => $initializationPhpCode . $converted['initialization'],
-                               'execution' => sprintf('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\BooleanNode::convertToBoolean(%s)', $converted['execution'])
+                               'execution' => sprintf(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode::class . '::convertToBoolean(%s)', $converted['execution'])
                        );
                }
        }
index dad5c29..e4d0b39 100644 (file)
@@ -80,12 +80,12 @@ abstract class AbstractConditionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHel
                $elseViewHelperEncountered = FALSE;
                foreach ($this->childNodes as $childNode) {
                        if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'TYPO3\\CMS\\Fluid\\ViewHelpers\\ThenViewHelper') {
+                               && $childNode->getViewHelperClassName() === \TYPO3\CMS\Fluid\ViewHelpers\ThenViewHelper::class) {
                                $data = $childNode->evaluate($this->renderingContext);
                                return $data;
                        }
                        if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'TYPO3\\CMS\\Fluid\\ViewHelpers\\ElseViewHelper') {
+                               && $childNode->getViewHelperClassName() === \TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class) {
                                $elseViewHelperEncountered = TRUE;
                        }
                }
@@ -115,7 +115,7 @@ abstract class AbstractConditionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHel
                }
                foreach ($this->childNodes as $childNode) {
                        if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'TYPO3\\CMS\\Fluid\\ViewHelpers\\ElseViewHelper') {
+                               && $childNode->getViewHelperClassName() === \TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class) {
                                return $childNode->evaluate($this->renderingContext);
                        }
                }
@@ -138,13 +138,13 @@ abstract class AbstractConditionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHel
        public function compile($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler) {
                foreach ($syntaxTreeNode->getChildNodes() as $childNode) {
                        if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'TYPO3\\CMS\\Fluid\\ViewHelpers\\ThenViewHelper') {
+                               && $childNode->getViewHelperClassName() === \TYPO3\CMS\Fluid\ViewHelpers\ThenViewHelper::class) {
 
                                $childNodesAsClosure = $templateCompiler->wrapChildNodesInClosure($childNode);
                                $initializationPhpCode .= sprintf('%s[\'__thenClosure\'] = %s;', $argumentsVariableName, $childNodesAsClosure) . chr(10);
                        }
                        if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'TYPO3\\CMS\\Fluid\\ViewHelpers\\ElseViewHelper') {
+                               && $childNode->getViewHelperClassName() === \TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class) {
 
                                $childNodesAsClosure = $templateCompiler->wrapChildNodesInClosure($childNode);
                                $initializationPhpCode .= sprintf('%s[\'__elseClosure\'] = %s;', $argumentsVariableName, $childNodesAsClosure) . chr(10);
index 72d9340..e54d2bf 100644 (file)
@@ -32,7 +32,7 @@ abstract class AbstractWidgetController extends \TYPO3\CMS\Extbase\Mvc\Controlle
        /**
         * @var array
         */
-       protected $supportedRequestTypes = array('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest');
+       protected $supportedRequestTypes = array(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class);
 
        /**
         * Configuration for this widget.
index d73a61f..5ea04cd 100644 (file)
@@ -188,13 +188,13 @@ abstract class AbstractWidgetViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper
         * @todo clean up, and make it somehow more routing compatible.
         */
        private function initializeWidgetIdentifier() {
-               if (!$this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetViewHelper', 'nextWidgetNumber')) {
+               if (!$this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper::class, 'nextWidgetNumber')) {
                        $widgetCounter = 0;
                } else {
-                       $widgetCounter = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetViewHelper', 'nextWidgetNumber');
+                       $widgetCounter = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper::class, 'nextWidgetNumber');
                }
                $widgetIdentifier = '@widget_' . $widgetCounter;
-               $this->viewHelperVariableContainer->addOrUpdate('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetViewHelper', 'nextWidgetNumber', $widgetCounter + 1);
+               $this->viewHelperVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper::class, 'nextWidgetNumber', $widgetCounter + 1);
                $this->widgetContext->setWidgetIdentifier($widgetIdentifier);
        }
 }
index df5b982..53934cf 100644 (file)
@@ -43,7 +43,7 @@ abstract class AbstractGenerator {
         */
        public function __construct() {
                \TYPO3\CMS\Fluid\Fluid::$debugMode = TRUE; // We want ViewHelper argument documentation
-               $this->abstractViewHelperReflectionClass = new \TYPO3\CMS\Extbase\Reflection\ClassReflection('TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper');
+               $this->abstractViewHelperReflectionClass = new \TYPO3\CMS\Extbase\Reflection\ClassReflection(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class);
        }
 
        /**
@@ -55,7 +55,7 @@ abstract class AbstractGenerator {
        protected function getClassNamesInNamespace($namespace) {
                $affectedViewHelperClassNames = array();
 
-               $allViewHelperClassNames = $this->reflectionService->getAllSubClassNamesForClass('TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper');
+               $allViewHelperClassNames = $this->reflectionService->getAllSubClassNamesForClass(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class);
                foreach ($allViewHelperClassNames as $viewHelperClassName) {
                        if ($this->reflectionService->isClassAbstract($viewHelperClassName)) {
                                continue;
index 60d884f..9e3391a 100644 (file)
@@ -233,7 +233,7 @@ abstract class AbstractTemplateView implements \TYPO3\CMS\Extbase\Mvc\View\ViewI
                        }
                        $section = $sections[$sectionName];
 
-                       $renderingContext->getViewHelperVariableContainer()->add('TYPO3\\CMS\\Fluid\\ViewHelpers\\SectionViewHelper', 'isCurrentlyRenderingSection', 'TRUE');
+                       $renderingContext->getViewHelperVariableContainer()->add(\TYPO3\CMS\Fluid\ViewHelpers\SectionViewHelper::class, 'isCurrentlyRenderingSection', 'TRUE');
 
                        $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
                        $output = $section->evaluate($renderingContext);
index be89f84..35ddb62 100644 (file)
@@ -30,17 +30,17 @@ class CaseViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
         */
        public function render($value = NULL, $default = FALSE) {
                $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
-               if (!$viewHelperVariableContainer->exists('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')) {
+               if (!$viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')) {
                        throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('The case View helper can only be used within a switch View helper', 1368112037);
                }
                if (is_null($value) && $default === FALSE) {
                        throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('The case View helper must have either value or default argument', 1382867521);
                }
-               $switchExpression = $viewHelperVariableContainer->get('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression');
+               $switchExpression = $viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression');
 
                // non-type-safe comparison by intention
                if ($default === TRUE || $switchExpression == $value) {
-                       $viewHelperVariableContainer->addOrUpdate('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break', TRUE);
+                       $viewHelperVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break', TRUE);
                        return $this->renderChildren();
                }
                return '';
index 19cb9bc..af42432 100644 (file)
@@ -80,7 +80,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
         */
        protected function getNameWithoutPrefix() {
                if ($this->isObjectAccessorMode()) {
-                       $formObjectName = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName');
+                       $formObjectName = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName');
                        if (!empty($formObjectName)) {
                                $propertySegments = explode('.', $this->arguments['property']);
                                $propertyPath = '';
@@ -161,7 +161,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
         * @return void
         */
        protected function addAdditionalIdentityPropertiesIfNeeded() {
-               if (!$this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')) {
+               if (!$this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')) {
                        return;
                }
                $propertySegments = explode('.', $this->arguments['property']);
@@ -169,17 +169,17 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
                if (count($propertySegments) < 2) {
                        return;
                }
-               $formObject = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject');
-               $objectName = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName');
+               $formObject = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject');
+               $objectName = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName');
                // If count == 2 -> we need to go through the for-loop exactly once
                for ($i = 1; $i < count($propertySegments); $i++) {
                        $object = ObjectAccess::getPropertyPath($formObject, implode('.', array_slice($propertySegments, 0, $i)));
                        $objectName .= '[' . $propertySegments[($i - 1)] . ']';
                        $hiddenIdentityField = $this->renderHiddenIdentityField($object, $objectName);
                        // Add the hidden identity field to the ViewHelperVariableContainer
-                       $additionalIdentityProperties = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties');
+                       $additionalIdentityProperties = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties');
                        $additionalIdentityProperties[$objectName] = $hiddenIdentityField;
-                       $this->viewHelperVariableContainer->addOrUpdate('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties', $additionalIdentityProperties);
+                       $this->viewHelperVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties', $additionalIdentityProperties);
                }
        }
 
@@ -189,10 +189,10 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
         * @return mixed Value
         */
        protected function getPropertyValue() {
-               if (!$this->viewHelperVariableContainer->exists('TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper', 'formObject')) {
+               if (!$this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')) {
                        return NULL;
                }
-               $formObject = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject');
+               $formObject = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject');
                $propertyName = $this->arguments['property'];
                if (is_array($formObject)) {
                        return isset($formObject[$propertyName]) ? $formObject[$propertyName] : NULL;
@@ -206,7 +206,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
         * @return bool TRUE if we should evaluate the domain object, FALSE otherwise.
         */
        protected function isObjectAccessorMode() {
-               return $this->hasArgument('property') && $this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName');
+               return $this->hasArgument('property') && $this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName');
        }
 
        /**
@@ -242,7 +242,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
                        return new \TYPO3\CMS\Extbase\Error\Result();
                }
                $originalRequestMappingResults = $this->getRequest()->getOriginalRequestMappingResults();
-               $formObjectName = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName');
+               $formObjectName = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName');
                return $originalRequestMappingResults->forProperty($formObjectName)->forProperty($this->arguments['property']);
        }
 
@@ -254,8 +254,8 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
         */
        protected function renderHiddenFieldForEmptyValue() {
                $hiddenFieldNames = array();
-               if ($this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')) {
-                       $hiddenFieldNames = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields');
+               if ($this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')) {
+                       $hiddenFieldNames = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields');
                }
                $fieldName = $this->getName();
                if (substr($fieldName, -2) === '[]') {
@@ -263,7 +263,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper {
                }
                if (!in_array($fieldName, $hiddenFieldNames)) {
                        $hiddenFieldNames[] = $fieldName;
-                       $this->viewHelperVariableContainer->addOrUpdate('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields', $hiddenFieldNames);
+                       $this->viewHelperVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields', $hiddenFieldNames);
                        return '<input type="hidden" name="' . htmlspecialchars($fieldName) . '" value="" />';
                }
                return '';
index f18a9bd..20c56b4 100644 (file)
@@ -35,10 +35,10 @@ abstract class AbstractFormViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\A
                if ($fieldName === NULL || $fieldName === '') {
                        return '';
                }
-               if (!$this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')) {
+               if (!$this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')) {
                        return $fieldName;
                }
-               $fieldNamePrefix = (string)$this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix');
+               $fieldNamePrefix = (string)$this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix');
                if ($fieldNamePrefix === '') {
                        return $fieldName;
                }
@@ -86,12 +86,12 @@ abstract class AbstractFormViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\A
         * @return void
         */
        protected function registerFieldNameForFormTokenGeneration($fieldName) {
-               if ($this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formFieldNames')) {
-                       $formFieldNames = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formFieldNames');
+               if ($this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames')) {
+                       $formFieldNames = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames');
                } else {
                        $formFieldNames = array();
                }
                $formFieldNames[] = $fieldName;
-               $this->viewHelperVariableContainer->addOrUpdate('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formFieldNames', $formFieldNames);
+               $this->viewHelperVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames', $formFieldNames);
        }
 }
index ad3de3d..f5b0123 100644 (file)
@@ -179,8 +179,8 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         * @return string HTML-string for the additional identity properties
         */
        protected function renderAdditionalIdentityFields() {
-               if ($this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties')) {
-                       $additionalIdentityProperties = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties');
+               if ($this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties')) {
+                       $additionalIdentityProperties = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties');
                        $output = '';
                        foreach ($additionalIdentityProperties as $identity) {
                                $output .= chr(10) . $identity;
@@ -223,7 +223,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
        protected function addFormObjectNameToViewHelperVariableContainer() {
                $formObjectName = $this->getFormObjectName();
                if ($formObjectName !== NULL) {
-                       $this->viewHelperVariableContainer->add('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName', $formObjectName);
+                       $this->viewHelperVariableContainer->add(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName', $formObjectName);
                }
        }
 
@@ -235,7 +235,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
        protected function removeFormObjectNameFromViewHelperVariableContainer() {
                $formObjectName = $this->getFormObjectName();
                if ($formObjectName !== NULL) {
-                       $this->viewHelperVariableContainer->remove('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName');
+                       $this->viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName');
                }
        }
 
@@ -263,8 +263,8 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         */
        protected function addFormObjectToViewHelperVariableContainer() {
                if ($this->hasArgument('object')) {
-                       $this->viewHelperVariableContainer->add('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject', $this->arguments['object']);
-                       $this->viewHelperVariableContainer->add('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties', array());
+                       $this->viewHelperVariableContainer->add(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject', $this->arguments['object']);
+                       $this->viewHelperVariableContainer->add(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties', array());
                }
        }
 
@@ -275,8 +275,8 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         */
        protected function removeFormObjectFromViewHelperVariableContainer() {
                if ($this->hasArgument('object')) {
-                       $this->viewHelperVariableContainer->remove('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject');
-                       $this->viewHelperVariableContainer->remove('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties');
+                       $this->viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject');
+                       $this->viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties');
                }
        }
 
@@ -287,7 +287,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         */
        protected function addFieldNamePrefixToViewHelperVariableContainer() {
                $fieldNamePrefix = $this->getFieldNamePrefix();
-               $this->viewHelperVariableContainer->add('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix', $fieldNamePrefix);
+               $this->viewHelperVariableContainer->add(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix', $fieldNamePrefix);
        }
 
        /**
@@ -309,7 +309,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         * @return void
         */
        protected function removeFieldNamePrefixFromViewHelperVariableContainer() {
-               $this->viewHelperVariableContainer->remove('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix');
+               $this->viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix');
        }
 
        /**
@@ -318,7 +318,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         * @return void
         */
        protected function addFormFieldNamesToViewHelperVariableContainer() {
-               $this->viewHelperVariableContainer->add('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formFieldNames', array());
+               $this->viewHelperVariableContainer->add(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames', array());
        }
 
        /**
@@ -327,7 +327,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         * @return void
         */
        protected function removeFormFieldNamesFromViewHelperVariableContainer() {
-               $this->viewHelperVariableContainer->remove('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formFieldNames');
+               $this->viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames');
        }
 
        /**
@@ -336,7 +336,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         * @return string the hmac field
         */
        protected function renderRequestHashField() {
-               $formFieldNames = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formFieldNames');
+               $formFieldNames = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames');
                $this->postProcessUriArgumentsForRequesthash($this->formActionUriArguments, $formFieldNames);
                $requestHash = $this->requestHashService->generateRequestHash($formFieldNames, $this->getFieldNamePrefix());
                // in v4, we need to prefix __hmac as well to make it show up in the request object.
@@ -388,8 +388,8 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         * Remove Checkbox field names from ViewHelper variable container, to start from scratch when a new form starts.
         */
        protected function removeCheckboxFieldNamesFromViewHelperVariableContainer() {
-               if ($this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\CheckboxViewHelper', 'checkboxFieldNames')) {
-                       $this->viewHelperVariableContainer->remove('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\CheckboxViewHelper', 'checkboxFieldNames');
+               if ($this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper::class, 'checkboxFieldNames')) {
+                       $this->viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper::class, 'checkboxFieldNames');
                }
        }
 
@@ -399,7 +399,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
         * @return string The hmac field
         */
        protected function renderTrustedPropertiesField() {
-               $formFieldNames = $this->viewHelperVariableContainer->get('TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper', 'formFieldNames');
+               $formFieldNames = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames');
                $requestHash = $this->mvcPropertyMappingConfigurationService->generateTrustedPropertiesToken($formFieldNames, $this->getFieldNamePrefix());
                return '<input type="hidden" name="' . $this->prefixFieldName('__trustedProperties') . '" value="' . htmlspecialchars($requestHash) . '" />';
        }
index b00fdc4..05c5d05 100644 (file)
@@ -92,8 +92,8 @@ class SectionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHel
         * @api
         */
        public function render() {
-               if ($this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\SectionViewHelper', 'isCurrentlyRenderingSection')) {
-                       $this->viewHelperVariableContainer->remove('TYPO3\\CMS\\Fluid\\ViewHelpers\\SectionViewHelper', 'isCurrentlyRenderingSection');
+               if ($this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\SectionViewHelper::class, 'isCurrentlyRenderingSection')) {
+                       $this->viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\SectionViewHelper::class, 'isCurrentlyRenderingSection');
                        return $this->renderChildren();
                }
                return '';
index c60a894..9a9b560 100644 (file)
@@ -74,24 +74,24 @@ class SwitchViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelp
                $this->backupSwitchState();
                $templateVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
 
-               $templateVariableContainer->addOrUpdate('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression', $expression);
-               $templateVariableContainer->addOrUpdate('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break', FALSE);
+               $templateVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression', $expression);
+               $templateVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break', FALSE);
 
                foreach ($this->childNodes as $childNode) {
                        if (
                                !$childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
-                               || $childNode->getViewHelperClassName() !== 'TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper'
+                               || $childNode->getViewHelperClassName() !== \TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper::class
                        ) {
                                continue;
                        }
                        $content = $childNode->evaluate($this->renderingContext);
-                       if ($templateVariableContainer->get('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break') === TRUE) {
+                       if ($templateVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break') === TRUE) {
                                break;
                        }
                }
 
-               $templateVariableContainer->remove('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression');
-               $templateVariableContainer->remove('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break');
+               $templateVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression');
+               $templateVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break');
 
                $this->restoreSwitchState();
                return $content;
@@ -103,11 +103,11 @@ class SwitchViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelp
         * @return void
         */
        protected function backupSwitchState() {
-               if ($this->renderingContext->getViewHelperVariableContainer()->exists('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')) {
-                       $this->backupSwitchExpression = $this->renderingContext->getViewHelperVariableContainer()->get('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression');
+               if ($this->renderingContext->getViewHelperVariableContainer()->exists(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')) {
+                       $this->backupSwitchExpression = $this->renderingContext->getViewHelperVariableContainer()->get(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression');
                }
-               if ($this->renderingContext->getViewHelperVariableContainer()->exists('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break')) {
-                       $this->backupBreakState = $this->renderingContext->getViewHelperVariableContainer()->get('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break');
+               if ($this->renderingContext->getViewHelperVariableContainer()->exists(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break')) {
+                       $this->backupBreakState = $this->renderingContext->getViewHelperVariableContainer()->get(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break');
                }
        }
 
@@ -119,13 +119,13 @@ class SwitchViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelp
        protected function restoreSwitchState() {
                if ($this->backupSwitchExpression !== NULL) {
                        $this->renderingContext->getViewHelperVariableContainer()->addOrUpdate(
-                               'TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper',
+                               \TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class,
                                'switchExpression',
                                $this->backupSwitchExpression
                        );
                }
                if ($this->backupBreakState !== FALSE) {
-                       $this->renderingContext->getViewHelperVariableContainer()->addOrUpdate('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break', TRUE);
+                       $this->renderingContext->getViewHelperVariableContainer()->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break', TRUE);
                }
        }
 }
index 422c958..3a8d8b0 100644 (file)
@@ -37,10 +37,10 @@ class EscapeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $mockParsingState;
 
        public function setUp() {
-               $this->escapeInterceptor = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\Interceptor\\Escape', array('dummy'));
-               $this->mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper');
-               $this->mockNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array(), array(), '', FALSE);
-               $this->mockParsingState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $this->escapeInterceptor = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\Interceptor\Escape::class, array('dummy'));
+               $this->mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class);
+               $this->mockNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array(), array(), '', FALSE);
+               $this->mockParsingState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
        }
 
        /**
@@ -87,11 +87,11 @@ class EscapeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function processWrapsCurrentViewHelperInHtmlspecialcharsViewHelperOnObjectAccessor() {
                $interceptorPosition = \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OBJECTACCESSOR;
-               $mockNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array(), array(), '', FALSE);
-               $mockEscapeViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\HtmlspecialcharsViewHelper');
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\HtmlspecialcharsViewHelper')->will($this->returnValue($mockEscapeViewHelper));
-               $mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', $mockEscapeViewHelper, array('value' => $mockNode))->will($this->returnValue($this->mockNode));
+               $mockNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, array(), array(), '', FALSE);
+               $mockEscapeViewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelper::class);
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelper::class)->will($this->returnValue($mockEscapeViewHelper));
+               $mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, $mockEscapeViewHelper, array('value' => $mockNode))->will($this->returnValue($this->mockNode));
                $this->escapeInterceptor->_set('objectManager', $mockObjectManager);
 
                $actualResult = $this->escapeInterceptor->process($mockNode, $interceptorPosition, $this->mockParsingState);
index 64ee81e..bacd64b 100644 (file)
@@ -50,9 +50,9 @@ class ParsingStateTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function renderCallsTheRightMethodsOnTheRootNode() {
-               $renderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContextInterface');
+               $renderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface::class);
 
-               $rootNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
+               $rootNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
                $rootNode->expects($this->once())->method('evaluate')->with($renderingContext)->will($this->returnValue('T3DD09 Rock!'));
                $this->parsingState->setRootNode($rootNode);
                $renderedValue = $this->parsingState->render($renderingContext);
index 697652a..0a90e95 100644 (file)
@@ -23,11 +23,11 @@ class AbstractNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $childNode;
 
        public function setUp() {
-               $this->renderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext', array(), array(), '', FALSE);
+               $this->renderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class, array(), array(), '', FALSE);
 
-               $this->abstractNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode', array('evaluate'));
+               $this->abstractNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class, array('evaluate'));
 
-               $this->childNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode');
+               $this->childNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class);
                $this->abstractNode->addChildNode($this->childNode);
        }
 
index 956af48..171551f 100644 (file)
@@ -30,7 +30,7 @@ class BooleanNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Setup fixture
         */
        public function setUp() {
-               $this->renderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContextInterface');
+               $this->renderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface::class);
        }
 
        /**
@@ -38,7 +38,7 @@ class BooleanNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Fluid\Core\Parser\Exception
         */
        public function havingMoreThanThreeElementsInTheSyntaxTreeThrowsException() {
-               $rootNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
+               $rootNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
                $rootNode->expects($this->once())->method('getChildNodes')->will($this->returnValue(array(1, 2, 3, 4)));
 
                new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode($rootNode);
@@ -348,10 +348,10 @@ class BooleanNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
                $rootNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode();
 
-               $object1Node = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array('evaluate'), array('foo'));
+               $object1Node = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, array('evaluate'), array('foo'));
                $object1Node->expects($this->any())->method('evaluate')->will($this->returnValue($object1));
 
-               $object2Node = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array('evaluate'), array('foo'));
+               $object2Node = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, array('evaluate'), array('foo'));
                $object2Node->expects($this->any())->method('evaluate')->will($this->returnValue($object2));
 
                $rootNode->addChildNode($object1Node);
@@ -371,10 +371,10 @@ class BooleanNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
                $rootNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode();
 
-               $object1Node = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array('evaluate'), array('foo'));
+               $object1Node = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, array('evaluate'), array('foo'));
                $object1Node->expects($this->any())->method('evaluate')->will($this->returnValue($object1));
 
-               $object2Node = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array('evaluate'), array('foo'));
+               $object2Node = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, array('evaluate'), array('foo'));
                $object2Node->expects($this->any())->method('evaluate')->will($this->returnValue($object2));
 
                $rootNode->addChildNode($object1Node);
index 8be29d8..c10e0e5 100644 (file)
@@ -22,7 +22,7 @@ class NumericNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function renderReturnsProperIntegerGivenInConstructor() {
                $string = '1';
                $node = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NumericNode($string);
-               $this->assertEquals($node->evaluate($this->getMock('TYPO3\CMS\Fluid\Core\Rendering\RenderingContext')), 1, 'The rendered value of a numeric node does not match the string given in the constructor.');
+               $this->assertEquals($node->evaluate($this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class)), 1, 'The rendered value of a numeric node does not match the string given in the constructor.');
        }
 
        /**
@@ -31,7 +31,7 @@ class NumericNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function renderReturnsProperFloatGivenInConstructor() {
                $string = '1.1';
                $node = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NumericNode($string);
-               $this->assertEquals($node->evaluate($this->getMock('TYPO3\CMS\Fluid\Core\Rendering\RenderingContext')), 1.1, 'The rendered value of a numeric node does not match the string given in the constructor.');
+               $this->assertEquals($node->evaluate($this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class)), 1.1, 'The rendered value of a numeric node does not match the string given in the constructor.');
        }
 
        /**
index bb887db..dae2b3b 100644 (file)
@@ -22,7 +22,7 @@ class TextNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function renderReturnsSameStringAsGivenInConstructor() {
                $string = 'I can work quite effectively in a train!';
                $node = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode($string);
-               $this->assertEquals($node->evaluate($this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext')), $string, 'The rendered string of a text node is not the same as the string given in the constructor.');
+               $this->assertEquals($node->evaluate($this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class)), $string, 'The rendered string of a text node is not the same as the string given in the constructor.');
        }
 
        /**
index da9119a..070986f 100644 (file)
@@ -51,18 +51,18 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Setup fixture
         */
        public function setUp() {
-               $this->renderingContext = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext');
+               $this->renderingContext = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class);
 
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $this->renderingContext->_set('objectManager', $this->mockObjectManager);
 
-               $this->templateVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TemplateVariableContainer');
+               $this->templateVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer::class);
                $this->renderingContext->injectTemplateVariableContainer($this->templateVariableContainer);
 
-               $this->controllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE);
+               $this->controllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', FALSE);
                $this->renderingContext->setControllerContext($this->controllerContext);
 
-               $this->viewHelperVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer');
+               $this->viewHelperVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer::class);
                $this->renderingContext->_set('viewHelperVariableContainer', $this->viewHelperVariableContainer);
        }
 
@@ -70,9 +70,9 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function constructorSetsViewHelperAndArguments() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper');
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class);
                $arguments = array('foo' => 'bar');
-               $viewHelperNode = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('dummy'), array($viewHelper, $arguments));
+               $viewHelperNode = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('dummy'), array($viewHelper, $arguments));
 
                $this->assertEquals(get_class($viewHelper), $viewHelperNode->getViewHelperClassName());
                $this->assertEquals($arguments, $viewHelperNode->_get('arguments'));
@@ -82,9 +82,9 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function childNodeAccessFacetWorksAsExpected() {
-               $childNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\TextNode', array(), array('foo'));
+               $childNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, array(), array('foo'));
 
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Tests\\Unit\\Core\\Parser\\Fixtures\\ChildNodeAccessFacetViewHelper', array('setChildNodes', 'initializeArguments', 'render', 'prepareArguments'));
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Tests\Unit\Core\Parser\Fixtures\ChildNodeAccessFacetViewHelper::class, array('setChildNodes', 'initializeArguments', 'render', 'prepareArguments'));
 
                $viewHelperNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode($mockViewHelper, array());
                $viewHelperNode->addChildNode($childNode);
@@ -98,7 +98,7 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function initializeArgumentsAndRenderIsCalledByViewHelperNode() {
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('initializeArgumentsAndRender', 'prepareArguments'));
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('initializeArgumentsAndRender', 'prepareArguments'));
                $mockViewHelper->expects($this->once())->method('initializeArgumentsAndRender');
 
                $viewHelperNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode($mockViewHelper, array());
@@ -116,7 +116,7 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'param2' => new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('param2', 'string', 'Hallo', TRUE, NULL, TRUE)
                );
 
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('initializeArgumentsAndRender', 'prepareArguments'));
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('initializeArgumentsAndRender', 'prepareArguments'));
                $mockViewHelper->expects($this->any())->method('prepareArguments')->will($this->returnValue($arguments));
                $mockViewHelper->expects($this->once())->method('initializeArgumentsAndRender');
 
@@ -132,7 +132,7 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function evaluateMethodPassesRenderingContextToViewHelper() {
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'validateArguments', 'prepareArguments', 'setRenderingContext'));
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'validateArguments', 'prepareArguments', 'setRenderingContext'));
                $mockViewHelper->expects($this->once())->method('setRenderingContext')->with($this->renderingContext);
 
                $viewHelperNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode($mockViewHelper, array());
@@ -144,7 +144,7 @@ class ViewHelperNodeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function multipleEvaluateCallsShareTheSameViewHelperInstance() {
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'validateArguments', 'prepareArguments', 'setViewHelperVariableContainer'));
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'validateArguments', 'prepareArguments', 'setViewHelperVariableContainer'));
                $mockViewHelper->expects($this->any())->method('render')->will($this->returnValue('String'));
 
                $viewHelperNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode($mockViewHelper, array());
index aa9d34a..2548f5e 100644 (file)
@@ -32,10 +32,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function extractNamespaceDefinitionsExtractsNamespacesCorrectly() {
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_call('extractNamespaceDefinitions', ' \\{namespace f4=F7\\Rocks} {namespace f4=TYPO3\Rocks\Really}');
                $expected = array(
-                       'f' => 'TYPO3\CMS\Fluid\ViewHelpers',
+                       'f' => \TYPO3\CMS\Fluid\ViewHelpers::class,
                        'f4' => 'TYPO3\Rocks\Really'
                );
                $this->assertEquals($expected, $templateParser->getNamespaces(), 'Namespaces do not match.');
@@ -51,12 +51,12 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'http://otherdomain.tld/ns/other/viewhelpers' => 'My\Other\Namespace'
                        )
                );
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->injectSettings($mockSettings);
                $templateParser->_call('extractNamespaceDefinitions', 'Some content <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f5="http://domain.tld/ns/my/viewhelpers"
                xmlns:xyz="http://otherdomain.tld/ns/other/viewhelpers" />');
                $expected = array(
-                       'f' => 'TYPO3\CMS\Fluid\ViewHelpers',
+                       'f' => \TYPO3\CMS\Fluid\ViewHelpers::class,
                        'f5' => 'My\Namespace',
                        'xyz' => 'My\Other\Namespace'
                );
@@ -67,10 +67,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function extractNamespaceDefinitionsResolveNamespacesWithDefaultPattern() {
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_call('extractNamespaceDefinitions', '<xml xmlns="http://www.w3.org/1999/xhtml" xmlns:xyz="http://typo3.org/ns/Some/Package/ViewHelpers" />');
                $expected = array(
-                       'f' => 'TYPO3\CMS\Fluid\ViewHelpers',
+                       'f' => \TYPO3\CMS\Fluid\ViewHelpers::class,
                        'xyz' => 'Some\Package\ViewHelpers'
                );
                $this->assertEquals($expected, $templateParser->getNamespaces(), 'Namespaces do not match.');
@@ -85,12 +85,12 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'http://domain.tld/ns/my/viewhelpers' => 'My\Namespace'
                        )
                );
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->injectSettings($mockSettings);
                $templateParser->_call('extractNamespaceDefinitions', '<xml xmlns="http://www.w3.org/1999/xhtml" xmlns:f5="http://domain.tld/ns/my/viewhelpers"
                xmlns:xyz="http://otherdomain.tld/ns/other/viewhelpers" />');
                $expected = array(
-                       'f' => 'TYPO3\CMS\Fluid\ViewHelpers',
+                       'f' => \TYPO3\CMS\Fluid\ViewHelpers::class,
                        'f5' => 'My\Namespace'
                );
                $this->assertEquals($expected, $templateParser->getNamespaces(), 'Namespaces do not match.');
@@ -100,10 +100,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function extractNamespaceDefinitionsSilentlySkipsXmlNamespaceDeclarationForTheDefaultFluidNamespace() {
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_call('extractNamespaceDefinitions', '<foo xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://domain.tld/this/will/be/ignored" />');
                $expected = array(
-                       'f' => 'TYPO3\CMS\Fluid\ViewHelpers'
+                       'f' => \TYPO3\CMS\Fluid\ViewHelpers::class
                );
                $this->assertEquals($expected, $templateParser->getNamespaces(), 'Namespaces do not match.');
        }
@@ -113,7 +113,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Fluid\Core\Parser\Exception
         */
        public function extractNamespaceDefinitionsThrowsExceptionIfNamespaceIsRedeclared() {
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_call('extractNamespaceDefinitions', '{namespace typo3=TYPO3\CMS\Fluid\Blablubb} {namespace typo3= TYPO3\Rocks\Blu}');
        }
 
@@ -127,7 +127,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'http://domain.tld/ns/my/viewhelpers' => 'My\Namespace'
                        )
                );
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->injectSettings($mockSettings);
                $templateParser->_call('extractNamespaceDefinitions', '<foo xmlns="http://www.w3.org/1999/xhtml" xmlns:typo3="http://domain.tld/ns/my/viewhelpers" />{namespace typo3=TYPO3\CMS\Fluid\Blablubb}');
        }
@@ -142,7 +142,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'http://domain.tld/ns/my/viewhelpers' => 'My\Namespace'
                        )
                );
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->injectSettings($mockSettings);
                $templateParser->_call('extractNamespaceDefinitions', '{namespace typo3=TYPO3\CMS\Fluid\Blablubb} <foo xmlns="http://www.w3.org/1999/xhtml" xmlns:typo3="http://domain.tld/ns/my/viewhelpers" />');
        }
@@ -151,7 +151,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperNameWithMultipleLevelsCanBeResolvedByResolveViewHelperName() {
-               $mockTemplateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'), array(), '', FALSE);
+               $mockTemplateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'), array(), '', FALSE);
                $result = $mockTemplateParser->_call('resolveViewHelperName', 'f', 'foo.bar.baz');
                $expected = 'TYPO3\CMS\Fluid\ViewHelpers\Foo\Bar\BazViewHelper';
                $this->assertEquals($expected, $result, 'The name of the View Helper Name could not be resolved.');
@@ -161,7 +161,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperNameWithOneLevelCanBeResolvedByResolveViewHelperName() {
-               $mockTemplateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'), array(), '', FALSE);
+               $mockTemplateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'), array(), '', FALSE);
                $actual = $mockTemplateParser->_call('resolveViewHelperName', 'f', 'myown');
                $expected = 'TYPO3\CMS\Fluid\ViewHelpers\MyownViewHelper';
                $this->assertEquals($expected, $actual);
@@ -185,7 +185,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function unquoteStringReturnsUnquotedStrings($quoted, $unquoted) {
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $this->assertEquals($unquoted, $templateParser->_call('unquoteString', $quoted));
        }
 
@@ -206,7 +206,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function splitTemplateAtDynamicTagsReturnsCorrectlySplitTemplate($templateName) {
                $template = file_get_contents(__DIR__ . '/Fixtures/' . $templateName . '.html', FILE_TEXT);
                $expectedResult = require(__DIR__ . '/Fixtures/' . $templateName . '-split.php');
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $this->assertSame($expectedResult, $templateParser->_call('splitTemplateAtDynamicTags', $template), 'Filed for ' . $templateName);
        }
 
@@ -214,18 +214,18 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function buildObjectTreeCreatesRootNodeAndSetsUpParsingState() {
-               $mockRootNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
+               $mockRootNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
 
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('setRootNode')->with($mockRootNode);
                $mockState->expects($this->once())->method('pushNodeToStack')->with($mockRootNode);
                $mockState->expects($this->once())->method('countNodeStack')->will($this->returnValue(1));
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState')->will($this->returnValue($mockState));
-               $mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode')->will($this->returnValue($mockRootNode));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class)->will($this->returnValue($mockState));
+               $mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($mockRootNode));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->_call('buildObjectTree', array(), \TYPO3\CMS\Fluid\Core\Parser\TemplateParser::CONTEXT_OUTSIDE_VIEWHELPER_ARGUMENTS);
        }
@@ -235,16 +235,16 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Fluid\Core\Parser\Exception
         */
        public function buildObjectTreeThrowsExceptionIfOpenTagsRemain() {
-               $mockRootNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
+               $mockRootNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
 
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('countNodeStack')->will($this->returnValue(2));
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState')->will($this->returnValue($mockState));
-               $mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode')->will($this->returnValue($mockRootNode));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class)->will($this->returnValue($mockState));
+               $mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($mockRootNode));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->_call('buildObjectTree', array(), \TYPO3\CMS\Fluid\Core\Parser\TemplateParser::CONTEXT_OUTSIDE_VIEWHELPER_ARGUMENTS);
        }
@@ -253,14 +253,14 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function buildObjectTreeDelegatesHandlingOfTemplateElements() {
-               $mockRootNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockRootNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('countNodeStack')->will($this->returnValue(1));
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState')->will($this->returnValue($mockState));
-               $mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode')->will($this->returnValue($mockRootNode));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class)->will($this->returnValue($mockState));
+               $mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($mockRootNode));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('textHandler', 'openingViewHelperTagHandler', 'closingViewHelperTagHandler', 'textAndShorthandSyntaxHandler'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('textHandler', 'openingViewHelperTagHandler', 'closingViewHelperTagHandler', 'textAndShorthandSyntaxHandler'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->expects($this->at(0))->method('textAndShorthandSyntaxHandler')->with($mockState, 'The first part is simple');
                $templateParser->expects($this->at(1))->method('textHandler')->with($mockState, '<f:for each="{a: {a: 0, b: 2, c: 4}}" as="array"><f:for each="{array}" as="value">{value} </f:for>');
@@ -277,10 +277,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function openingViewHelperTagHandlerDelegatesViewHelperInitialization() {
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->never())->method('popNodeFromStack');
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('parseArguments', 'initializeViewHelperAndAddItToStack'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('parseArguments', 'initializeViewHelperAndAddItToStack'));
                $templateParser->expects($this->once())->method('parseArguments')->with(array('arguments'))->will($this->returnValue(array('parsedArguments')));
                $templateParser->expects($this->once())->method('initializeViewHelperAndAddItToStack')->with($mockState, 'namespaceIdentifier', 'methodIdentifier', array('parsedArguments'));
 
@@ -291,10 +291,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function openingViewHelperTagHandlerPopsNodeFromStackForSelfClosingTags() {
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
-               $mockState->expects($this->once())->method('popNodeFromStack')->will($this->returnValue($this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface')));
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
+               $mockState->expects($this->once())->method('popNodeFromStack')->will($this->returnValue($this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface::class)));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('parseArguments', 'initializeViewHelperAndAddItToStack'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('parseArguments', 'initializeViewHelperAndAddItToStack'));
 
                $templateParser->_call('openingViewHelperTagHandler', $mockState, '', '', array(), TRUE);
        }
@@ -303,21 +303,21 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function initializeViewHelperAndAddItToStackCreatesRequestedViewHelperAndViewHelperNode() {
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper');
-               $mockViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array(), array(), '', FALSE);
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class);
+               $mockViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array(), array(), '', FALSE);
 
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface');
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface::class);
                $mockNodeOnStack->expects($this->once())->method('addChildNode')->with($mockViewHelperNode);
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\MyownViewHelper')->will($this->returnValue($mockViewHelper));
-               $mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode')->will($this->returnValue($mockViewHelperNode));
+               $mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class)->will($this->returnValue($mockViewHelperNode));
 
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('getNodeFromStack')->will($this->returnValue($mockNodeOnStack));
                $mockState->expects($this->once())->method('pushNodeToStack')->with($mockViewHelperNode);
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('abortIfUnregisteredArgumentsExist', 'abortIfRequiredArgumentsAreMissing', 'rewriteBooleanNodesInArgumentsObjectTree'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('abortIfUnregisteredArgumentsExist', 'abortIfRequiredArgumentsAreMissing', 'rewriteBooleanNodesInArgumentsObjectTree'));
                $templateParser->_set('objectManager', $mockObjectManager);
 
                $templateParser->_call('initializeViewHelperAndAddItToStack', $mockState, 'f', 'myown', array('arguments'));
@@ -330,20 +330,20 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $expectedArguments = array('expectedArguments');
                $argumentsObjectTree = array('arguments');
 
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper');
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class);
                $mockViewHelper->expects($this->once())->method('prepareArguments')->will($this->returnValue($expectedArguments));
-               $mockViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array(), array(), '', FALSE);
+               $mockViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array(), array(), '', FALSE);
 
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface');
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface::class);
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\MyownViewHelper')->will($this->returnValue($mockViewHelper));
-               $mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode')->will($this->returnValue($mockViewHelperNode));
+               $mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class)->will($this->returnValue($mockViewHelperNode));
 
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('getNodeFromStack')->will($this->returnValue($mockNodeOnStack));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('abortIfUnregisteredArgumentsExist', 'abortIfRequiredArgumentsAreMissing', 'rewriteBooleanNodesInArgumentsObjectTree'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('abortIfUnregisteredArgumentsExist', 'abortIfRequiredArgumentsAreMissing', 'rewriteBooleanNodesInArgumentsObjectTree'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->expects($this->once())->method('abortIfUnregisteredArgumentsExist')->with($expectedArguments, $argumentsObjectTree);
                $templateParser->expects($this->once())->method('abortIfRequiredArgumentsAreMissing')->with($expectedArguments, $argumentsObjectTree);
@@ -355,21 +355,21 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function initializeViewHelperAndAddItToStackHandlesPostParseFacets() {
-               $mockViewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\Tests\\Unit\\Core\\Parser\\Fixtures\\PostParseFacetViewHelper', array('prepareArguments'));
-               $mockViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array(), array(), '', FALSE);
+               $mockViewHelper = $this->getMock(\TYPO3\CMS\Fluid\Tests\Unit\Core\Parser\Fixtures\PostParseFacetViewHelper::class, array('prepareArguments'));
+               $mockViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array(), array(), '', FALSE);
 
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface');
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface::class);
                $mockNodeOnStack->expects($this->once())->method('addChildNode')->with($mockViewHelperNode);
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\MyownViewHelper')->will($this->returnValue($mockViewHelper));
-               $mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode')->will($this->returnValue($mockViewHelperNode));
+               $mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class)->will($this->returnValue($mockViewHelperNode));
 
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('getNodeFromStack')->will($this->returnValue($mockNodeOnStack));
-               $mockState->expects($this->once())->method('getVariableContainer')->will($this->returnValue($this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TemplateVariableContainer')));
+               $mockState->expects($this->once())->method('getVariableContainer')->will($this->returnValue($this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer::class)));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('abortIfUnregisteredArgumentsExist', 'abortIfRequiredArgumentsAreMissing', 'rewriteBooleanNodesInArgumentsObjectTree'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('abortIfUnregisteredArgumentsExist', 'abortIfRequiredArgumentsAreMissing', 'rewriteBooleanNodesInArgumentsObjectTree'));
                $templateParser->_set('objectManager', $mockObjectManager);
 
                $templateParser->_call('initializeViewHelperAndAddItToStack', $mockState, 'f', 'myown', array('arguments'));
@@ -384,7 +384,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $expected = array(new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('firstArgument', 'string', '', FALSE));
                $actual = array('firstArgument' => 'foo', 'secondArgument' => 'bar');
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
 
                $templateParser->_call('abortIfUnregisteredArgumentsExist', $expected, $actual);
        }
@@ -401,7 +401,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'name1' => 'bla'
                );
 
-               $mockTemplateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $mockTemplateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
 
                $mockTemplateParser->_call('abortIfUnregisteredArgumentsExist', $expectedArguments, $actualArguments);
                // dummy assertion to avoid "did not perform any assertions" error
@@ -418,7 +418,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('secondArgument', 'string', '', TRUE)
                );
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
 
                $templateParser->_call('abortIfRequiredArgumentsAreMissing', $expected, array());
        }
@@ -435,7 +435,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'name2' => 'bla'
                );
 
-               $mockTemplateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $mockTemplateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
 
                $mockTemplateParser->_call('abortIfRequiredArgumentsAreMissing', $expectedArguments, $actualArguments);
                // dummy assertion to avoid "did not perform any assertions" error
@@ -447,11 +447,11 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Fluid\Core\Parser\Exception
         */
        public function closingViewHelperTagHandlerThrowsExceptionBecauseOfClosingTagWhichWasNeverOpened() {
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface', array(), array(), '', FALSE);
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface::class, array(), array(), '', FALSE);
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('popNodeFromStack')->will($this->returnValue($mockNodeOnStack));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
 
                $templateParser->_call('closingViewHelperTagHandler', $mockState, 'f', 'method');
        }
@@ -461,11 +461,11 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Fluid\Core\Parser\Exception
         */
        public function closingViewHelperTagHandlerThrowsExceptionBecauseOfWrongTagNesting() {
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array(), array(), '', FALSE);
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array(), array(), '', FALSE);
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('popNodeFromStack')->will($this->returnValue($mockNodeOnStack));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
 
                $templateParser->_call('closingViewHelperTagHandler', $mockState, 'f', 'method');
        }
@@ -474,10 +474,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function objectAccessorHandlerCallsInitializeViewHelperAndAddItToStackIfViewHelperSyntaxIsPresent() {
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
-               $mockState->expects($this->exactly(2))->method('popNodeFromStack')->will($this->returnValue($this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface')));
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
+               $mockState->expects($this->exactly(2))->method('popNodeFromStack')->will($this->returnValue($this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface::class)));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('recursiveArrayHandler', 'postProcessArgumentsForObjectAccessor', 'initializeViewHelperAndAddItToStack'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('recursiveArrayHandler', 'postProcessArgumentsForObjectAccessor', 'initializeViewHelperAndAddItToStack'));
                $templateParser->expects($this->at(0))->method('recursiveArrayHandler')->with('format: "H:i"')->will($this->returnValue(array('format' => 'H:i')));
                $templateParser->expects($this->at(1))->method('postProcessArgumentsForObjectAccessor')->with(array('format' => 'H:i'))->will($this->returnValue(array('processedArguments')));
                $templateParser->expects($this->at(2))->method('initializeViewHelperAndAddItToStack')->with($mockState, 'f', 'format.date', array('processedArguments'));
@@ -490,17 +490,17 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function objectAccessorHandlerCreatesObjectAccessorNodeWithExpectedValueAndAddsItToStack() {
-               $objectAccessorNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array(), array(), '', FALSE);
+               $objectAccessorNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, array(), array(), '', FALSE);
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', 'objectAccessorString')->will($this->returnValue($objectAccessorNode));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, 'objectAccessorString')->will($this->returnValue($objectAccessorNode));
 
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode', array(), array(), '', FALSE);
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class, array(), array(), '', FALSE);
                $mockNodeOnStack->expects($this->once())->method('addChildNode')->with($objectAccessorNode);
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('getNodeFromStack')->will($this->returnValue($mockNodeOnStack));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_set('objectManager', $mockObjectManager);
 
                $templateParser->_call('objectAccessorHandler', $mockState, 'objectAccessorString', '', '', '');
@@ -510,21 +510,21 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function valuesFromObjectAccessorsAreRunThroughValueInterceptorsByDefault() {
-               $objectAccessorNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array(), array(), '', FALSE);
-               $objectAccessorNodeInterceptor = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\InterceptorInterface');
+               $objectAccessorNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, array(), array(), '', FALSE);
+               $objectAccessorNodeInterceptor = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::class);
                $objectAccessorNodeInterceptor->expects($this->once())->method('process')->with($objectAccessorNode)->will($this->returnArgument(0));
 
-               $parserConfiguration = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\Configuration');
+               $parserConfiguration = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\Configuration::class);
                $parserConfiguration->expects($this->once())->method('getInterceptors')->with(\TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OBJECTACCESSOR)->will($this->returnValue(array($objectAccessorNodeInterceptor)));
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $mockObjectManager->expects($this->once())->method('get')->will($this->returnValue($objectAccessorNode));
 
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode', array(), array(), '', FALSE);
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class, array(), array(), '', FALSE);
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('getNodeFromStack')->will($this->returnValue($mockNodeOnStack));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->_set('configuration', $parserConfiguration);
 
@@ -548,7 +548,7 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @param array $expected
         */
        public function parseArgumentsWorksAsExpected($argumentsString, array $expected) {
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('buildArgumentObjectTree'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('buildArgumentObjectTree'));
                $templateParser->expects($this->any())->method('buildArgumentObjectTree')->will($this->returnArgument(0));
 
                $this->assertSame($expected, $templateParser->_call('parseArguments', $argumentsString));
@@ -558,10 +558,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function buildArgumentObjectTreeReturnsTextNodeForSimplyString() {
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\TextNode', 'a very plain string')->will($this->returnValue('theTextNode'));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, 'a very plain string')->will($this->returnValue('theTextNode'));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('dummy'));
                $templateParser->_set('objectManager', $mockObjectManager);
 
                $this->assertEquals('theTextNode', $templateParser->_call('buildArgumentObjectTree', 'a very plain string'));
@@ -571,10 +571,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function buildArgumentObjectTreeBuildsObjectTreeForComlexString() {
-               $objectTree = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $objectTree = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $objectTree->expects($this->once())->method('getRootNode')->will($this->returnValue('theRootNode'));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('splitTemplateAtDynamicTags', 'buildObjectTree'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('splitTemplateAtDynamicTags', 'buildObjectTree'));
                $templateParser->expects($this->at(0))->method('splitTemplateAtDynamicTags')->with('a <very> {complex} string')->will($this->returnValue('split string'));
                $templateParser->expects($this->at(1))->method('buildObjectTree')->with('split string')->will($this->returnValue($objectTree));
 
@@ -585,11 +585,11 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function textAndShorthandSyntaxHandlerDelegatesAppropriately() {
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $mockObjectManager->expects($this->any())->method('get')->will($this->returnArgument(1));
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('objectAccessorHandler', 'arrayHandler', 'textHandler'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('objectAccessorHandler', 'arrayHandler', 'textHandler'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->expects($this->at(0))->method('objectAccessorHandler')->with($mockState, 'someThing.absolutely', '', '', '');
                $templateParser->expects($this->at(1))->method('textHandler')->with($mockState, ' "fishy" is \'going\' ');
@@ -603,16 +603,16 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function arrayHandlerAddsArrayNodeWithProperContentToStack() {
-               $arrayNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ArrayNode', array(), array(array()));
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode', array(), array(), '', FALSE);
+               $arrayNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode::class, array(), array(array()));
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class, array(), array(), '', FALSE);
                $mockNodeOnStack->expects($this->once())->method('addChildNode')->with($arrayNode);
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('getNodeFromStack')->will($this->returnValue($mockNodeOnStack));
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ArrayNode', 'processedArrayText')->will($this->returnValue($arrayNode));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode::class, 'processedArrayText')->will($this->returnValue($arrayNode));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('recursiveArrayHandler'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('recursiveArrayHandler'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->expects($this->once())->method('recursiveArrayHandler')->with('arrayText')->will($this->returnValue('processedArrayText'));
 
@@ -639,10 +639,10 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider arrayTexts
         */
        public function recursiveArrayHandlerReturnsExpectedArray($arrayText, $expectedArray) {
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $mockObjectManager->expects($this->any())->method('get')->will($this->returnArgument(1));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('buildArgumentObjectTree'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('buildArgumentObjectTree'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->expects($this->any())->method('buildArgumentObjectTree')->will($this->returnArgument(0));
 
@@ -653,22 +653,22 @@ class TemplateParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function textNodesAreRunThroughTextInterceptors() {
-               $textNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\TextNode', array(), array(), '', FALSE);
-               $textInterceptor = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\InterceptorInterface');
+               $textNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, array(), array(), '', FALSE);
+               $textInterceptor = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::class);
                $textInterceptor->expects($this->once())->method('process')->with($textNode)->will($this->returnArgument(0));
 
-               $parserConfiguration = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\Configuration');
+               $parserConfiguration = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\Configuration::class);
                $parserConfiguration->expects($this->once())->method('getInterceptors')->with(\TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_TEXT)->will($this->returnValue(array($textInterceptor)));
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\TextNode', 'string')->will($this->returnValue($textNode));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, 'string')->will($this->returnValue($textNode));
 
-               $mockNodeOnStack = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode', array(), array(), '', FALSE);
+               $mockNodeOnStack = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class, array(), array(), '', FALSE);
                $mockNodeOnStack->expects($this->once())->method('addChildNode')->with($textNode);
-               $mockState = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsingState');
+               $mockState = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
                $mockState->expects($this->once())->method('getNodeFromStack')->will($this->returnValue($mockNodeOnStack));
 
-               $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('splitTemplateAtDynamicTags', 'buildObjectTree'));
+               $templateParser = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class, array('splitTemplateAtDynamicTags', 'buildObjectTree'));
                $templateParser->_set('objectManager', $mockObjectManager);
                $templateParser->_set('configuration', $parserConfiguration);
 
index daa8219..fe5c08f 100644 (file)
@@ -24,14 +24,14 @@ class RenderingContextTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $renderingContext;
 
        public function setUp() {
-               $this->renderingContext = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext', array('dummy'));
+               $this->renderingContext = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class, array('dummy'));
        }
 
        /**
         * @test
         */
        public function templateVariableContainerCanBeReadCorrectly() {
-               $templateVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TemplateVariableContainer');
+               $templateVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer::class);
                $this->renderingContext->injectTemplateVariableContainer($templateVariableContainer);
                $this->assertSame($this->renderingContext->getTemplateVariableContainer(), $templateVariableContainer, 'Template Variable Container could not be read out again.');
        }
@@ -40,7 +40,7 @@ class RenderingContextTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function controllerContextCanBeReadCorrectly() {
-               $controllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE);
+               $controllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', FALSE);
                $this->renderingContext->setControllerContext($controllerContext);
                $this->assertSame($this->renderingContext->getControllerContext(), $controllerContext);
        }
@@ -49,7 +49,7 @@ class RenderingContextTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperVariableContainerCanBeReadCorrectly() {
-               $viewHelperVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer');
+               $viewHelperVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer::class);
                $this->renderingContext->_set('viewHelperVariableContainer', $viewHelperVariableContainer);
                $this->assertSame($viewHelperVariableContainer, $this->renderingContext->getViewHelperVariableContainer());
        }
index 0f2db89..0bf82be 100644 (file)
@@ -28,7 +28,7 @@ class AbstractConditionViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractConditionViewHelper', array('getRenderingContext', 'renderChildren', 'hasArgument'));
+               $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);
        }
@@ -47,8 +47,8 @@ class AbstractConditionViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderThenChildReturnsThenViewHelperChildIfConditionIsTrueAndThenViewHelperChildExists() {
-               $mockThenViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('getViewHelperClassName', 'evaluate'), array(), '', FALSE);
-               $mockThenViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue('TYPO3\\CMS\\Fluid\\ViewHelpers\\ThenViewHelper'));
+               $mockThenViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('getViewHelperClassName', 'evaluate'), array(), '', FALSE);
+               $mockThenViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue(\TYPO3\CMS\Fluid\ViewHelpers\ThenViewHelper::class));
                $mockThenViewHelperNode->expects($this->at(1))->method('evaluate')->with($this->renderingContext)->will($this->returnValue('ThenViewHelperResults'));
 
                $this->viewHelper->setChildNodes(array($mockThenViewHelperNode));
@@ -68,8 +68,8 @@ class AbstractConditionViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderElseChildRendersElseViewHelperChildIfConditionIsFalseAndNoThenViewHelperChildExists() {
-               $mockElseViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
-               $mockElseViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue('TYPO3\\CMS\\Fluid\\ViewHelpers\\ElseViewHelper'));
+               $mockElseViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
+               $mockElseViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue(\TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class));
                $mockElseViewHelperNode->expects($this->at(1))->method('evaluate')->with($this->renderingContext)->will($this->returnValue('ElseViewHelperResults'));
 
                $this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
@@ -93,8 +93,8 @@ class AbstractConditionViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderThenChildReturnsEmptyStringIfChildNodesOnlyContainElseViewHelper() {
-               $mockElseViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('getViewHelperClassName', 'evaluate'), array(), '', FALSE);
-               $mockElseViewHelperNode->expects($this->any())->method('getViewHelperClassName')->will($this->returnValue('TYPO3\\CMS\\Fluid\\ViewHelpers\\ElseViewHelper'));
+               $mockElseViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('getViewHelperClassName', 'evaluate'), array(), '', FALSE);
+               $mockElseViewHelperNode->expects($this->any())->method('getViewHelperClassName')->will($this->returnValue(\TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class));
                $this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
                $this->viewHelper->expects($this->never())->method('renderChildren')->will($this->returnValue('Child nodes'));
 
@@ -106,7 +106,7 @@ class AbstractConditionViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function thenArgumentHasPriorityOverChildNodesIfConditionIsTrue() {
-               $mockThenViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
+               $mockThenViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
                $mockThenViewHelperNode->expects($this->never())->method('evaluate');
 
                $this->viewHelper->setChildNodes(array($mockThenViewHelperNode));
@@ -136,8 +136,8 @@ class AbstractConditionViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function elseArgumentHasPriorityOverChildNodesIfConditionIsFalse() {
-               $mockElseViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
-               $mockElseViewHelperNode->expects($this->any())->method('getViewHelperClassName')->will($this->returnValue('TYPO3\\CMS\\Fluid\\ViewHelpers\\ElseViewHelper'));
+               $mockElseViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
+               $mockElseViewHelperNode->expects($this->any())->method('getViewHelperClassName')->will($this->returnValue(\TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class));
                $mockElseViewHelperNode->expects($this->never())->method('evaluate');
 
                $this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
index e3de50f..4c75d71 100644 (file)
@@ -22,14 +22,14 @@ class AbstractTagBasedViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractTagBasedViewHelper', array('dummy'), array(), '', FALSE);
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper::class, array('dummy'), array(), '', FALSE);
        }
 
        /**
         * @test
         */
        public function initializeResetsUnderlyingTagBuilder() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('reset'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('reset'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('reset');
                $this->viewHelper->_set('tag', $mockTagBuilder);
 
@@ -40,7 +40,7 @@ class AbstractTagBasedViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function oneTagAttributeIsRenderedCorrectly() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('addAttribute')->with('foo', 'bar');
                $this->viewHelper->_set('tag', $mockTagBuilder);
 
@@ -54,7 +54,7 @@ class AbstractTagBasedViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function additionalTagAttributesAreRenderedCorrectly() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('addAttribute')->with('foo', 'bar');
                $this->viewHelper->_set('tag', $mockTagBuilder);
 
@@ -68,7 +68,7 @@ class AbstractTagBasedViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function dataAttributesAreRenderedCorrectly() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute'), array(), '', FALSE);
                $mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('data-foo', 'bar');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('data-baz', 'foos');
                $this->viewHelper->_set('tag', $mockTagBuilder);
@@ -83,7 +83,7 @@ class AbstractTagBasedViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function standardTagAttributesAreRegistered() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute'), array(), '', FALSE);
                $mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('class', 'classAttribute');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('dir', 'dirAttribute');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('id', 'idAttribute');
@@ -114,7 +114,7 @@ class AbstractTagBasedViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function registerTagAttributeRegistersArgumentWithDefaultValue() {
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractTagBasedViewHelper', array('registerArgument'), array(), '', FALSE);
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper::class, array('registerArgument'), array(), '', FALSE);
                $this->viewHelper->expects($this->once())->method('registerArgument')->with('foo', 'string', 'Description', FALSE, 'defaultValue');
                $this->viewHelper->_call('registerTagAttribute', 'foo', 'string', 'Description', FALSE, 'defaultValue');
        }
@@ -123,7 +123,7 @@ class AbstractTagBasedViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function registerTagAttributeRegistersArgumentWithNullIfNoDefaultValueIsSet() {
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractTagBasedViewHelper', array('registerArgument'), array(), '', FALSE);
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper::class, array('registerArgument'), array(), '', FALSE);
                $this->viewHelper->expects($this->once())->method('registerArgument')->with('foo', 'string', 'Description', FALSE, NULL);
                $this->viewHelper->_call('registerTagAttribute', 'foo', 'string', 'Description', FALSE);
        }
index f448c0f..d2cb210 100644 (file)
@@ -59,14 +59,14 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        );
 
        public function setUp() {
-               $this->mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
+               $this->mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class, array(), array(), '', FALSE);
        }
 
        /**
         * @test
         */
        public function argumentsCanBeRegistered() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render'), array(), '', FALSE);
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $name = 'This is a name';
@@ -84,7 +84,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
         */
        public function registeringTheSameArgumentNameAgainThrowsException() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render'), array(), '', FALSE);
 
                $name = 'shortName';
                $description = 'Example desc';
@@ -99,7 +99,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function overrideArgumentOverwritesExistingArgumentDefinition() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render'), array(), '', FALSE);
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $name = 'argumentName';
@@ -120,7 +120,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
         */
        public function overrideArgumentThrowsExceptionWhenTryingToOverwriteAnNonexistingArgument() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render'), array(), '', FALSE);
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $viewHelper->_call('overrideArgument', 'argumentName', 'string', 'description', TRUE);
@@ -130,7 +130,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function prepareArgumentsCallsInitializeArguments() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'initializeArguments'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'initializeArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $viewHelper->expects($this->once())->method('initializeArguments');
@@ -145,14 +145,14 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
                \TYPO3\CMS\Fluid\Fluid::$debugMode = TRUE;
 
-               $dataCacheMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', array(), array(), '', FALSE);
+               $dataCacheMock = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, array(), array(), '', FALSE);
                $dataCacheMock->expects($this->any())->method('has')->will($this->returnValue(TRUE));
                $dataCacheMock->expects($this->any())->method('get')->will($this->returnValue(array()));
 
                $viewHelper = new \TYPO3\CMS\Fluid\Tests\Unit\Core\Fixtures\TestViewHelper();
 
-               $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with('TYPO3\\CMS\\Fluid\\Tests\\Unit\\Core\\Fixtures\\TestViewHelper', 'render')->will($this->returnValue($this->fixtureMethodParameters));
-               $this->mockReflectionService->expects($this->once())->method('getMethodTagsValues')->with('TYPO3\\CMS\\Fluid\\Tests\\Unit\\Core\\Fixtures\\TestViewHelper', 'render')->will($this->returnValue($this->fixtureMethodTags));
+               $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with(\TYPO3\CMS\Fluid\Tests\Unit\Core\Fixtures\TestViewHelper::class, 'render')->will($this->returnValue($this->fixtureMethodParameters));
+               $this->mockReflectionService->expects($this->once())->method('getMethodTagsValues')->with(\TYPO3\CMS\Fluid\Tests\Unit\Core\Fixtures\TestViewHelper::class, 'render')->will($this->returnValue($this->fixtureMethodTags));
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $expected = array(
@@ -173,13 +173,13 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
                \TYPO3\CMS\Fluid\Fluid::$debugMode = FALSE;
 
-               $dataCacheMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', array(), array(), '', FALSE);
+               $dataCacheMock = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, array(), array(), '', FALSE);
                $dataCacheMock->expects($this->any())->method('has')->will($this->returnValue(TRUE));
                $dataCacheMock->expects($this->any())->method('get')->will($this->returnValue(array()));
 
                $viewHelper = new \TYPO3\CMS\Fluid\Tests\Unit\Core\Fixtures\TestViewHelper2();
 
-               $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with('TYPO3\\CMS\\Fluid\\Tests\\Unit\\Core\\Fixtures\\TestViewHelper2', 'render')->will($this->returnValue($this->fixtureMethodParameters));
+               $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with(\TYPO3\CMS\Fluid\Tests\Unit\Core\Fixtures\TestViewHelper2::class, 'render')->will($this->returnValue($this->fixtureMethodParameters));
                $this->mockReflectionService->expects($this->never())->method('getMethodTagsValues');
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
@@ -196,7 +196,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function validateArgumentsCallsPrepareArguments() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $viewHelper->expects($this->once())->method('prepareArguments')->will($this->returnValue(array()));
@@ -208,7 +208,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function validateArgumentsAcceptsAllObjectsImplemtingArrayAccessAsAnArray() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'prepareArguments'), array(), '', FALSE);
 
                $viewHelper->setArguments(array('test' => new \ArrayObject));
                $viewHelper->expects($this->once())->method('prepareArguments')->will($this->returnValue(array('test' => new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition('test', 'array', FALSE, 'documentation'))));
@@ -219,7 +219,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function validateArgumentsCallsTheRightValidators() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $viewHelper->setArguments(array('test' => 'Value of argument'));
@@ -236,7 +236,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \InvalidArgumentException
         */
        public function validateArgumentsCallsTheRightValidatorsAndThrowsExceptionIfValidationIsWrong() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($this->mockReflectionService);
 
                $viewHelper->setArguments(array('test' => 'test'));
@@ -252,7 +252,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function initializeArgumentsAndRenderCallsTheCorrectSequenceOfMethods() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('validateArguments', 'initialize', 'callRenderMethod'));
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('validateArguments', 'initialize', 'callRenderMethod'));
                $viewHelper->expects($this->at(0))->method('validateArguments');
                $viewHelper->expects($this->at(1))->method('initialize');
                $viewHelper->expects($this->at(2))->method('callRenderMethod')->will($this->returnValue('Output'));
@@ -266,16 +266,16 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setRenderingContextShouldSetInnerVariables() {
-               $templateVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TemplateVariableContainer');
-               $viewHelperVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer');
-               $controllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE);
+               $templateVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer::class);
+               $viewHelperVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer::class);
+               $controllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', FALSE);
 
-               $renderingContext = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext', array('dummy'));
+               $renderingContext = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class, array('dummy'));
                $renderingContext->injectTemplateVariableContainer($templateVariableContainer);
                $renderingContext->_set('viewHelperVariableContainer', $viewHelperVariableContainer);
                $renderingContext->setControllerContext($controllerContext);
 
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper::class, array('render', 'prepareArguments'), array(), '', FALSE);
 
                $viewHelper->setRenderingContext($renderingContext);
 
index 55fc1de..65ec243 100644 (file)
@@ -165,7 +165,7 @@ class TagBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function resetResetsTagBuilder() {
-               $tagBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('dummy'));
+               $tagBuilder = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('dummy'));
                $tagBuilder->setTagName('tagName');
                $tagBuilder->setContent('some content');
                $tagBuilder->forceClosingTag(TRUE);
index 5565c04..9885ab3 100644 (file)
@@ -30,11 +30,11 @@ class ViewHelperVariableContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         */
        public function storedDataCanBeReadOutAgain() {
                $variable = 'Hello world';
-               $this->assertFalse($this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\TestViewHelper', 'test'));
-               $this->viewHelperVariableContainer->add('TYPO3\\CMS\\Fluid\\ViewHelpers\\TestViewHelper', 'test', $variable);
-               $this->assertTrue($this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\TestViewHelper', 'test'));
+               $this->assertFalse($this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\TestViewHelper::class, 'test'));
+               $this->viewHelperVariableContainer->add(\TYPO3\CMS\Fluid\ViewHelpers\TestViewHelper::class, 'test', $variable);
+               $this->assertTrue($this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\TestViewHelper::class, 'test'));
 
-               $this->assertEquals($variable, $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\TestViewHelper', 'test'));
+               $this->assertEquals($variable, $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\TestViewHelper::class, 'test'));
        }
 
        /**
@@ -84,7 +84,7 @@ class ViewHelperVariableContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function viewCanBeReadOutAgain() {
-               $view = $this->getMock('TYPO3\\CMS\\Fluid\\View\\AbstractTemplateView', array('getTemplateSource', 'getLayoutSource', 'getPartialSource', 'hasTemplate', 'canRender', 'getTemplateIdentifier', 'getLayoutIdentifier', 'getPartialIdentifier'));
+               $view = $this->getMock(\TYPO3\CMS\Fluid\View\AbstractTemplateView::class, array('getTemplateSource', 'getLayoutSource', 'getPartialSource', 'hasTemplate', 'canRender', 'getTemplateIdentifier', 'getLayoutIdentifier', 'getPartialIdentifier'));
                $this->viewHelperVariableContainer->setView($view);
                $this->assertSame($view, $this->viewHelperVariableContainer->getView());
        }
index fb0a3a4..5cbd36c 100644 (file)
@@ -37,9 +37,9 @@ class AbstractWidgetControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function canHandleWidgetRequest() {
                /** @var WidgetRequest|\PHPUnit_Framework_MockObject_MockObject $request */
-               $request = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest', array('dummy'), array(), '', FALSE);
+               $request = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class, array('dummy'), array(), '', FALSE);
                /** @var AbstractWidgetController|\PHPUnit_Framework_MockObject_MockObject $abstractWidgetController */
-               $abstractWidgetController = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetController', array('dummy'), array(), '', FALSE);
+               $abstractWidgetController = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController::class, array('dummy'), array(), '', FALSE);
                $this->assertTrue($abstractWidgetController->canProcessRequest($request));
        }
 
@@ -47,20 +47,20 @@ class AbstractWidgetControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function processRequestSetsWidgetConfiguration() {
-               $widgetContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetContext');
+               $widgetContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
                $widgetContext->expects($this->once())->method('getWidgetConfiguration')->will($this->returnValue('myConfiguration'));
                /** @var WidgetRequest|\PHPUnit_Framework_MockObject_MockObject $request */
-               $request = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest', array(), array(), '', FALSE);
+               $request = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class, array(), array(), '', FALSE);
                $request->expects($this->once())->method('getWidgetContext')->will($this->returnValue($widgetContext));
                /** @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject $response */
-               $response = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\ResponseInterface');
+               $response = $this->getMock(\TYPO3\CMS\Extbase\Mvc\ResponseInterface::class);
                /** @var AbstractWidgetController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $abstractWidgetController */
-               $abstractWidgetController = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetController', array('resolveActionMethodName', 'initializeActionMethodArguments', 'initializeActionMethodValidators', 'initializeAction', 'checkRequestHash', 'mapRequestArgumentsToControllerArguments', 'buildControllerContext', 'resolveView', 'callActionMethod'), array(), '', FALSE);
-               $mockUriBuilder = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $objectManager->expects($this->any())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder')->will($this->returnValue($mockUriBuilder));
+               $abstractWidgetController = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController::class, array('resolveActionMethodName', 'initializeActionMethodArguments', 'initializeActionMethodValidators', 'initializeAction', 'checkRequestHash', 'mapRequestArgumentsToControllerArguments', 'buildControllerContext', 'resolveView', 'callActionMethod'), array(), '', FALSE);
+               $mockUriBuilder = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class);
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $objectManager->expects($this->any())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class)->will($this->returnValue($mockUriBuilder));
 
-               $configurationService = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\MvcPropertyMappingConfigurationService');
+               $configurationService = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class);
                $abstractWidgetController->_set('mvcPropertyMappingConfigurationService', $configurationService);
                $abstractWidgetController->_set('arguments', new Arguments());
 
@@ -77,20 +77,20 @@ class AbstractWidgetControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $frameworkConfiguration = array(
                        'view' => array(
                                'widget' => array(
-                                       'TYPO3\\CMS\\Fluid\\ViewHelpers\\Widget\\PaginateViewHelper' => array(
+                                       \TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper::class => array(
                                                'templateRootPath' => 'EXT:fluid/Resources/Private/DummyTestTemplates'
                                        )
                                )
                        )
                );
-               $widgetContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetContext');
-               $widgetContext->expects($this->any())->method('getWidgetViewHelperClassName')->will($this->returnValue('TYPO3\\CMS\\Fluid\\ViewHelpers\\Widget\\PaginateViewHelper'));
-               $request = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest', array(), array(), '', FALSE);
+               $widgetContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
+               $widgetContext->expects($this->any())->method('getWidgetViewHelperClassName')->will($this->returnValue(\TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper::class));
+               $request = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class, array(), array(), '', FALSE);
                $request->expects($this->any())->method('getWidgetContext')->will($this->returnValue($widgetContext));
-               $configurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
+               $configurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class);
                $configurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($frameworkConfiguration));
-               $view = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
-               $abstractWidgetController = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetController', array('dummy'));
+               $view = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
+               $abstractWidgetController = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController::class, array('dummy'));
                $abstractWidgetController->_set('configurationManager', $configurationManager);
                $abstractWidgetController->_set('request', $request);
                $abstractWidgetController->_call('setViewConfiguration', $view);
index 6a7c25c..e60f93a 100644 (file)
@@ -65,17 +65,17 @@ class AbstractWidgetViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
         */
        public function setUp() {
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetViewHelper', array('validateArguments', 'initialize', 'callRenderMethod', 'getWidgetConfiguration', 'getRenderingContext'));
-               $this->mockExtensionService = $this->getMock('TYPO3\\CMS\\Extbase\\Service\\ExtensionService');
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper::class, array('validateArguments', 'initialize', 'callRenderMethod', 'getWidgetConfiguration', 'getRenderingContext'));
+               $this->mockExtensionService = $this->getMock(\TYPO3\CMS\Extbase\Service\ExtensionService::class);
                $this->viewHelper->_set('extensionService', $this->mockExtensionService);
-               $this->ajaxWidgetContextHolder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AjaxWidgetContextHolder', array(), array(), '', FALSE);
+               $this->ajaxWidgetContextHolder = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::class, array(), array(), '', FALSE);
                $this->viewHelper->injectAjaxWidgetContextHolder($this->ajaxWidgetContextHolder);
-               $this->widgetContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetContext');
-               $this->objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $this->objectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetContext')->will($this->returnValue($this->widgetContext));
+               $this->widgetContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
+               $this->objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $this->objectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class)->will($this->returnValue($this->widgetContext));
                $this->viewHelper->injectObjectManager($this->objectManager);
-               $this->request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
-               $this->controllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE);
+               $this->request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
+               $this->controllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', FALSE);
                $this->controllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));
                $this->viewHelper->_set('controllerContext', $this->controllerContext);
        }
@@ -102,8 +102,8 @@ class AbstractWidgetViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function callViewHelper() {
-               $mockViewHelperVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer');
-               $mockRenderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContextInterface');
+               $mockViewHelperVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer::class);
+               $mockRenderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface::class);
                $mockRenderingContext->expects($this->atLeastOnce())->method('getViewHelperVariableContainer')->will($this->returnValue($mockViewHelperVariableContainer));
                $this->viewHelper->setRenderingContext($mockRenderingContext);
                $this->viewHelper->expects($this->once())->method('getWidgetConfiguration')->will($this->returnValue('Some Widget Configuration'));
@@ -122,15 +122,15 @@ class AbstractWidgetViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setChildNodesAddsChildNodesToWidgetContext() {
-               $node1 = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode');
-               $node2 = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\TextNode', array(), array(), '', FALSE);
-               $node3 = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode');
-               $rootNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
+               $node1 = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class);
+               $node2 = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, array(), array(), '', FALSE);
+               $node3 = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode::class);
+               $rootNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
                $rootNode->expects($this->at(0))->method('addChildNode')->with($node1);
                $rootNode->expects($this->at(1))->method('addChildNode')->with($node2);
                $rootNode->expects($this->at(2))->method('addChildNode')->with($node3);
-               $this->objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode')->will($this->returnValue($rootNode));
-               $renderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContextInterface');
+               $this->objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($rootNode));
+               $renderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface::class);
                $this->viewHelper->_set('renderingContext', $renderingContext);
                $this->widgetContext->expects($this->once())->method('setViewHelperChildNodes')->with($rootNode, $renderingContext);
                $this->viewHelper->setChildNodes(array($node1, $node2, $node3));
@@ -150,13 +150,13 @@ class AbstractWidgetViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function initiateSubRequestBuildsRequestProperly() {
-               $controller = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetController', array(), array(), '', FALSE);
+               $controller = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController::class, array(), array(), '', FALSE);
                $this->viewHelper->_set('controller', $controller);
                // Initial Setup
-               $widgetRequest = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest');
-               $response = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
-               $this->objectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest')->will($this->returnValue($widgetRequest));
-               $this->objectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response')->will($this->returnValue($response));
+               $widgetRequest = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class);
+               $response = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Response::class);
+               $this->objectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class)->will($this->returnValue($widgetRequest));
+               $this->objectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Web\Response::class)->will($this->returnValue($response));
                // Widget Context is set
                $widgetRequest->expects($this->once())->method('setWidgetContext')->with($this->widgetContext);
                // The namespaced arguments are passed to the sub-request
index 7e1c749..a56ae6d 100644 (file)
@@ -32,7 +32,7 @@ class AjaxWidgetContextHolderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getThrowsExceptionIfWidgetContextIsNotFound() {
                /** @var \TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder $ajaxWidgetContextHolder */
-               $ajaxWidgetContextHolder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AjaxWidgetContextHolder', array('dummy'), array(), '', FALSE);
+               $ajaxWidgetContextHolder = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::class, array('dummy'), array(), '', FALSE);
                $ajaxWidgetContextHolder->get(42);
        }
 }
index 2815d67..8bbab15 100644 (file)
@@ -74,8 +74,8 @@ class WidgetContextTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperChildNodesCanBeReadAgain() {
-               $viewHelperChildNodes = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
-               $renderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContextInterface');
+               $viewHelperChildNodes = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
+               $renderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface::class);
                $this->widgetContext->setViewHelperChildNodes($viewHelperChildNodes, $renderingContext);
                $this->assertSame($viewHelperChildNodes, $this->widgetContext->getViewHelperChildNodes());
                $this->assertSame($renderingContext, $this->widgetContext->getViewHelperChildNodeRenderingContext());
index 2ce815f..9298f20 100644 (file)
@@ -52,13 +52,13 @@ class WidgetRequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $mockWidgetContext;
 
        public function setUp() {
-               $this->widgetRequestBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequestBuilder', array('setArgumentsFromRawRequestData'));
-               $this->mockWidgetRequest = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest');
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $this->mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest')->will($this->returnValue($this->mockWidgetRequest));
+               $this->widgetRequestBuilder = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequestBuilder::class, array('setArgumentsFromRawRequestData'));
+               $this->mockWidgetRequest = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class);
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $this->mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class)->will($this->returnValue($this->mockWidgetRequest));
                $this->widgetRequestBuilder->_set('objectManager', $this->mockObjectManager);
-               $this->mockWidgetContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetContext');
-               $this->mockAjaxWidgetContextHolder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\AjaxWidgetContextHolder', array(), array(), '', FALSE);
+               $this->mockWidgetContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
+               $this->mockAjaxWidgetContextHolder = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::class, array(), array(), '', FALSE);
                $this->widgetRequestBuilder->injectAjaxWidgetContextHolder($this->mockAjaxWidgetContextHolder);
                $this->mockAjaxWidgetContextHolder->expects($this->once())->method('get')->will($this->returnValue($this->mockWidgetContext));
        }
index fc63318..5b323af 100644 (file)
@@ -35,7 +35,7 @@ class WidgetRequestHandlerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Set up
         */
        public function setUp() {
-               $this->widgetRequestHandler = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequestHandler', array('dummy'), array(), '', FALSE);
+               $this->widgetRequestHandler = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequestHandler::class, array('dummy'), array(), '', FALSE);
        }
 
        /**
@@ -58,7 +58,7 @@ class WidgetRequestHandlerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function priorityIsHigherThanDefaultRequestHandler() {
-               $defaultWebRequestHandler = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\AbstractRequestHandler', array('handleRequest'), array(), '', FALSE);
+               $defaultWebRequestHandler = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHandler::class, array('handleRequest'), array(), '', FALSE);
                $this->assertTrue($this->widgetRequestHandler->getPriority() > $defaultWebRequestHandler->getPriority());
        }
 }
index 5fe8491..d469cdc 100644 (file)
@@ -30,9 +30,9 @@ class WidgetRequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setWidgetContextAlsoSetsControllerObjectName() {
-               $widgetContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetContext', array('getControllerObjectName'));
+               $widgetContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class, array('getControllerObjectName'));
                $widgetContext->expects($this->once())->method('getControllerObjectName')->will($this->returnValue('Tx_Fluid_ControllerObjectName'));
-               $widgetRequest = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest', array('setControllerObjectName'));
+               $widgetRequest = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class, array('setControllerObjectName'));
                $widgetRequest->expects($this->once())->method('setControllerObjectName')->with('Tx_Fluid_ControllerObjectName');
                $widgetRequest->setWidgetContext($widgetContext);
        }
@@ -41,8 +41,8 @@ class WidgetRequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function widgetContextCanBeReadAgain() {
-               $widgetContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetContext');
-               $widgetRequest = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest', array('setControllerObjectName'));
+               $widgetContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
+               $widgetRequest = $this->getMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class, array('setControllerObjectName'));
                $widgetRequest->setWidgetContext($widgetContext);
                $this->assertSame($widgetContext, $widgetRequest->getWidgetContext());
        }
index 10d86d7..26c163a 100644 (file)
@@ -42,12 +42,12 @@ class AbstractTemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
-               $this->templateVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TemplateVariableContainer', array('exists', 'remove', 'add'));
-               $this->viewHelperVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer', array('setView'));
-               $this->renderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext', array('getViewHelperVariableContainer', 'getTemplateVariableContainer'));
+               $this->templateVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer::class, array('exists', 'remove', 'add'));
+               $this->viewHelperVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer::class, array('setView'));
+               $this->renderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class, array('getViewHelperVariableContainer', 'getTemplateVariableContainer'));
                $this->renderingContext->expects($this->any())->method('getViewHelperVariableContainer')->will($this->returnValue($this->viewHelperVariableContainer));
                $this->renderingContext->expects($this->any())->method('getTemplateVariableContainer')->will($this->returnValue($this->templateVariableContainer));
-               $this->view = $this->getMock('TYPO3\\CMS\\Fluid\\View\\AbstractTemplateView', array('getTemplateSource', 'getLayoutSource', 'getPartialSource', 'canRender', 'getTemplateIdentifier', 'getLayoutIdentifier', 'getPartialIdentifier'));
+               $this->view = $this->getMock(\TYPO3\CMS\Fluid\View\AbstractTemplateView::class, array('getTemplateSource', 'getLayoutSource', 'getPartialSource', 'canRender', 'getTemplateIdentifier', 'getLayoutIdentifier', 'getPartialIdentifier'));
                $this->view->setRenderingContext($this->renderingContext);
        }
 
index 6241ea8..2b54e6f 100644 (file)
@@ -102,34 +102,34 @@ class StandaloneViewTest extends UnitTestCase {
         */
        public function setUp() {
                $this->singletonInstances = GeneralUtility::getSingletonInstances();
-               $this->view = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\StandaloneView', array('testFileExistence', 'buildParserConfiguration'), array(), '', FALSE);
-               $this->mockTemplateParser = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser');
-               $this->mockParsedTemplate = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\ParsedTemplateInterface');
+               $this->view = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\StandaloneView::class, array('testFileExistence', 'buildParserConfiguration'), array(), '', FALSE);
+               $this->mockTemplateParser = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class);
+               $this->mockParsedTemplate = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface::class);
                $this->mockTemplateParser->expects($this->any())->method('parse')->will($this->returnValue($this->mockParsedTemplate));
-               $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               $this->mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
                $this->mockObjectManager->expects($this->any())->method('get')->will($this->returnCallback(array($this, 'objectManagerCallback')));
-               $this->mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
-               $this->mockUriBuilder = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
-               $this->mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
-               $this->mockControllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext');
+               $this->mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
+               $this->mockUriBuilder = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class);
+               $this->mockContentObject = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+               $this->mockControllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class);
                $this->mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($this->mockRequest));
-               $this->mockViewHelperVariableContainer = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer');
-               $this->mockRenderingContext = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext');
+               $this->mockViewHelperVariableContainer = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer::class);
+               $this->mockRenderingContext = $this->getMock(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class);
                $this->mockRenderingContext->expects($this->any())->method('getControllerContext')->will($this->returnValue($this->mockControllerContext));
                $this->mockRenderingContext->expects($this->any())->method('getViewHelperVariableContainer')->will($this->returnValue($this->mockViewHelperVariableContainer));
                $this->view->_set('templateParser', $this->mockTemplateParser);
                $this->view->_set('objectManager', $this->mockObjectManager);
                $this->view->setRenderingContext($this->mockRenderingContext);
-               $this->mockTemplateCompiler = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Compiler\\TemplateCompiler');
+               $this->mockTemplateCompiler = $this->getMock(\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler::class);
                $this->view->_set('templateCompiler', $this->mockTemplateCompiler);
-               GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', $this->mockObjectManager);
-               GeneralUtility::addInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', $this->mockContentObject);
+               GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class, $this->mockObjectManager);
+               GeneralUtility::addInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, $this->mockContentObject);
 
-               $mockCacheManager = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array(), array(), '', FALSE);
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\PhpFrontend', array(), array(), '', FALSE);
+               $mockCacheManager = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class, array(), array(), '', FALSE);
+               $mockCache = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::class, array(), array(), '', FALSE);
                $mockCacheManager->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', $mockCacheManager);
+               GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Cache\CacheManager::class, $mockCacheManager);
        }
 
        /**
@@ -147,19 +147,19 @@ class StandaloneViewTest extends UnitTestCase {
         */
        public function objectManagerCallback($className) {
                switch ($className) {
-                       case 'TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface':
+                       case \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class:
                                return $this->mockConfigurationManager;
-                       case 'TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser':
+                       case \TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class:
                                return $this->mockTemplateParser;
-                       case 'TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext':
+                       case \TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class:
                                return $this->mockRenderingContext;
-                       case 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request':
+                       case \TYPO3\CMS\Extbase\Mvc\Web\Request::class:
                                return $this->mockRequest;
-                       case 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder':
+                       case \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class:
                                return $this->mockUriBuilder;
-                       case 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext':
+                       case \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class:
                                return $this->mockControllerContext;
-                       case 'TYPO3\\CMS\\Fluid\\Core\\Compiler\\TemplateCompiler':
+                       case \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler::class:
                                return $this->mockTemplateCompiler;
                }
                throw new \InvalidArgumentException('objectManagerCallback cannot handle class "' . $className . '". Looks like incomplete mocking in the tests.', 1417105493);
@@ -169,7 +169,7 @@ class StandaloneViewTest extends UnitTestCase {
         * @test
         */
        public function constructorSetsSpecifiedContentObject() {
-               $mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+               $mockContentObject = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                $this->mockConfigurationManager->expects($this->once())->method('setContentObject')->with($this->identicalTo($mockContentObject));
                new StandaloneView($mockContentObject);
        }
index e68ac44..412abbc 100644 (file)
@@ -30,7 +30,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function expandGenericPathPatternWorksWithOldNamingSchemeOfSubPackage() {
                $mockControllerContext = $this->setupMockControllerContextForPathResolving('MyPackage', 'ViewHelpers_Widget', 'Paginate', 'html');
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->_set('controllerContext', $mockControllerContext);
                $expected = array(ExtensionManagementUtility::extPath('frontend') . 'Resources/Private/Templates/ViewHelpers/Widget/Paginate/@action.html');
                $actual = $templateView->_call('expandGenericPathPattern', '@templateRoot/@subpackage/@controller/@action.@format', FALSE, FALSE);
@@ -44,7 +44,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function expandGenericPathPatternWorksWithNewNamingSchemeOfSubPackage() {
                $mockControllerContext = $this->setupMockControllerContextForPathResolving('MyPackage', 'ViewHelpers\\Widget', 'Paginate', 'html');
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->_set('controllerContext', $mockControllerContext);
                $expected = array(ExtensionManagementUtility::extPath('frontend') . 'Resources/Private/Templates/ViewHelpers/Widget/Paginate/@action.html');
                $actual = $templateView->_call('expandGenericPathPattern', '@templateRoot/@subpackage/@controller/@action.@format', FALSE, FALSE);
@@ -62,7 +62,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        protected function setupMockControllerContextForPathResolving($packageKey, $subPackageKey, $controllerName, $format) {
                $controllerObjectName = "TYPO3\\$packageKey\\" . ($subPackageKey != $subPackageKey . '\\' ? : '') . 'Controller\\' . $controllerName . 'Controller';
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
                $mockRequest->expects($this->any())->method('getControllerExtensionKey')->will($this->returnValue('frontend'));
                $mockRequest->expects($this->any())->method('getControllerPackageKey')->will($this->returnValue($packageKey));
                $mockRequest->expects($this->any())->method('getControllerSubPackageKey')->will($this->returnValue($subPackageKey));
@@ -70,7 +70,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockRequest->expects($this->any())->method('getControllerObjectName')->will($this->returnValue($controllerObjectName));
                $mockRequest->expects($this->any())->method('getFormat')->will($this->returnValue($format));
 
-               $mockControllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array('getRequest'), array(), '', FALSE);
+               $mockControllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array('getRequest'), array(), '', FALSE);
                $mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($mockRequest));
 
                return $mockControllerContext;
@@ -491,7 +491,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockControllerContext = $this->setupMockControllerContextForPathResolving($package, $subPackage, $controller, $format);
 
                /** @var TemplateView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $templateView */
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->setControllerContext($mockControllerContext);
                if ($templateRootPath !== NULL) {
                        $templateView->setTemplateRootPath($templateRootPath);
@@ -524,7 +524,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function expandGenericPathPatternWorksWithBubblingDisabledAndFormatNotOptional() {
                $mockControllerContext = $this->setupMockControllerContextForPathResolving('MyPackage', NULL, 'My', 'html');
 
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('getTemplateRootPaths'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('getTemplateRootPaths'), array(), '', FALSE);
                $templateView->_set('controllerContext', $mockControllerContext);
                $templateView->expects($this->any())->method('getTemplateRootPaths')->will($this->returnValue(array('Resources/Private/')));
 
@@ -540,7 +540,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function expandGenericPathPatternWorksWithSubpackageAndBubblingDisabledAndFormatNotOptional() {
                $mockControllerContext = $this->setupMockControllerContextForPathResolving('MyPackage', 'MySubPackage', 'My', 'html');
 
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('getTemplateRootPaths'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('getTemplateRootPaths'), array(), '', FALSE);
                $templateView->_set('controllerContext', $mockControllerContext);
                $templateView->expects($this->any())->method('getTemplateRootPaths')->will($this->returnValue(array('Resources/Private/')));
                $actual = $templateView->_call('expandGenericPathPattern', '@templateRoot/Templates/@subpackage/@controller/@action.@format', FALSE, FALSE);
@@ -557,7 +557,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function expandGenericPathPatternWorksWithSubpackageAndBubblingDisabledAndFormatOptional() {
                $mockControllerContext = $this->setupMockControllerContextForPathResolving('MyPackage', 'MySubPackage', 'My', 'html');
 
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('getTemplateRootPaths'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('getTemplateRootPaths'), array(), '', FALSE);
                $templateView->_set('controllerContext', $mockControllerContext);
                $templateView->expects($this->any())->method('getTemplateRootPaths')->will($this->returnValue(array('Resources/Private/')));
                $actual = $templateView->_call('expandGenericPathPattern', '@templateRoot/Templates/@subpackage/@controller/@action.@format', FALSE, TRUE);
@@ -575,7 +575,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function expandGenericPathPatternWorksWithSubpackageAndBubblingEnabledAndFormatOptional() {
                $mockControllerContext = $this->setupMockControllerContextForPathResolving('MyPackage', 'MySubPackage', 'My', 'html');
 
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('getTemplateRootPaths'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('getTemplateRootPaths'), array(), '', FALSE);
                $templateView->_set('controllerContext', $mockControllerContext);
                $templateView->expects($this->any())->method('getTemplateRootPaths')->will($this->returnValue(array('Resources/Private/')));
                $actual = $templateView->_call('expandGenericPathPattern', '@templateRoot/Templates/@subpackage/@controller/@action.@format', TRUE, TRUE);
@@ -596,7 +596,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getTemplateRootPathsReturnsUserSpecifiedTemplatePaths() {
                /** @var TemplateView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $templateView */
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->setTemplateRootPath('/foo/bar');
                $expected = array('/foo/bar');
                $actual = $templateView->_call('getTemplateRootPaths');
@@ -608,7 +608,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setTemplateRootPathOverrulesSetTemplateRootPaths() {
                /** @var TemplateView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $templateView */
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->setTemplateRootPath('/foo/bar');
                $templateView->setTemplateRootPaths(array('/overruled/path'));
                $expected = array('/overruled/path');
@@ -621,7 +621,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getPartialRootPathsReturnsUserSpecifiedPartialPath() {
                /** @var TemplateView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $templateView */
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->setPartialRootPath('/foo/bar');
                $expected = array('/foo/bar');
                $actual = $templateView->_call('getPartialRootPaths');
@@ -633,7 +633,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getLayoutRootPathsReturnsUserSpecifiedPartialPath() {
                /** @var TemplateView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $templateView */
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->setLayoutRootPath('/foo/bar');
                $expected = array('/foo/bar');
                $actual = $templateView->_call('getLayoutRootPaths');
@@ -655,7 +655,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
 
                /** @var TemplateView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $templateView */
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('expandGenericPathPattern', 'resolveFileNamePath'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('expandGenericPathPattern', 'resolveFileNamePath'), array(), '', FALSE);
                $templateView->expects($this->once())->method('expandGenericPathPattern')->with('@partialRoot/@subpackage/@partial.@format', TRUE, TRUE)->will($this->returnValue($paths));
                $templateView->expects($this->any())->method('resolveFileNamePath')->will($this->onConsecutiveCalls(
                        $paths[0],
@@ -684,7 +684,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
 
                /** @var TemplateView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $templateView */
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('expandGenericPathPattern', 'resolveFileNamePath'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('expandGenericPathPattern', 'resolveFileNamePath'), array(), '', FALSE);
                $templateView->expects($this->once())->method('expandGenericPathPattern')->with('@templateRoot/@subpackage/@controller/@action.@format', FALSE, FALSE)->will($this->returnValue($paths));
                $templateView->expects($this->any())->method('resolveFileNamePath')->will($this->onConsecutiveCalls(
                        $paths[0],
@@ -707,7 +707,7 @@ class TemplateViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                mkdir('vfs://MyTemplates');
                \file_put_contents('vfs://MyTemplates/MyCoolAction.html', 'contentsOfMyCoolAction');
 
-               $templateView = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('dummy'), array(), '', FALSE);
+               $templateView = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('dummy'), array(), '', FALSE);
                $templateView->_set('templatePathAndFilename', 'vfs://MyTemplates/MyCoolAction.html');
 
                $this->assertSame('contentsOfMyCoolAction', $templateView->_call('getTemplateSource'));
index 905cde1..1a9c108 100644 (file)
@@ -22,7 +22,7 @@ class AliasViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHe
        public function renderAddsSingleValueToTemplateVariableContainerAndRemovesItAfterRendering() {
                $viewHelper = new \TYPO3\CMS\Fluid\ViewHelpers\AliasViewHelper();
 
-               $mockViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('evaluateChildNodes'), array(), '', FALSE);
+               $mockViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('evaluateChildNodes'), array(), '', FALSE);
                $mockViewHelperNode->expects($this->once())->method('evaluateChildNodes')->will($this->returnValue('foo'));
 
                $this->templateVariableContainer->expects($this->at(0))->method('add')->with('someAlias', 'someValue');
@@ -39,7 +39,7 @@ class AliasViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHe
        public function renderAddsMultipleValuesToTemplateVariableContainerAndRemovesThemAfterRendering() {
                $viewHelper = new \TYPO3\CMS\Fluid\ViewHelpers\AliasViewHelper();
 
-               $mockViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('evaluateChildNodes'), array(), '', FALSE);
+               $mockViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('evaluateChildNodes'), array(), '', FALSE);
                $mockViewHelperNode->expects($this->once())->method('evaluateChildNodes')->will($this->returnValue('foo'));
 
                $this->templateVariableContainer->expects($this->at(0))->method('add')->with('someAlias', 'someValue');
@@ -58,7 +58,7 @@ class AliasViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHe
        public function renderDoesNotTouchTemplateVariableContainerAndReturnsChildNodesIfMapIsEmpty() {
                $viewHelper = new \TYPO3\CMS\Fluid\ViewHelpers\AliasViewHelper();
 
-               $mockViewHelperNode = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', array('evaluateChildNodes'), array(), '', FALSE);
+               $mockViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('evaluateChildNodes'), array(), '', FALSE);
                $mockViewHelperNode->expects($this->once())->method('evaluateChildNodes')->will($this->returnValue('foo'));
 
                $this->templateVariableContainer->expects($this->never())->method('add');
index 7ace577..da32b06 100644 (file)
@@ -34,7 +34,7 @@ class IfAuthenticatedViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelp
        public function setUp() {
                parent::setUp();
                $GLOBALS['BE_USER'] = new \stdClass();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Be\\Security\\IfAuthenticatedViewHelper', array('renderThenChild', 'renderElseChild'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Be\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);
index 1f8c8a7..7107019 100644 (file)
@@ -44,7 +44,7 @@ class IfHasRoleViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Vi
                                'title' => 'OtherRole'
                        )
                );
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Be\\Security\\IfHasRoleViewHelper', array('renderThenChild', 'renderElseChild'));
+               $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);
index 4c2276e..a1f5ddc 100644 (file)
@@ -23,7 +23,7 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getMock('TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper::class, array('renderChildren'));
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
        }
@@ -33,7 +33,7 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @expectedException \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
         */
        public function renderThrowsExceptionIfSwitchExpressionIsNotSetInViewHelperVariableContainer() {
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue(FALSE));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue(FALSE));
                $this->viewHelper->render('foo');
        }
 
@@ -41,8 +41,8 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderReturnsChildNodesIfTheSpecifiedValueIsEqualToTheSwitchExpression() {
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue('someValue'));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue('someValue'));
 
                $renderedChildNodes = 'ChildNodes';
                $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue($renderedChildNodes));
@@ -54,10 +54,10 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderSetsBreakStateInViewHelperVariableContainerIfTheSpecifiedValueIsEqualToTheSwitchExpression() {
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue('someValue'));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue('someValue'));
 
-               $this->viewHelperVariableContainer->expects($this->once())->method('addOrUpdate')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break', TRUE);
+               $this->viewHelperVariableContainer->expects($this->once())->method('addOrUpdate')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break', TRUE);
 
                $this->viewHelper->render('someValue');
        }
@@ -69,10 +69,10 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
                $numericValue = 123;
                $stringValue = '123';
 
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue($numericValue));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue($numericValue));
 
-               $this->viewHelperVariableContainer->expects($this->once())->method('addOrUpdate')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'break', TRUE);
+               $this->viewHelperVariableContainer->expects($this->once())->method('addOrUpdate')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break', TRUE);
 
                $this->viewHelper->render($stringValue);
        }
@@ -82,8 +82,8 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderReturnsAnEmptyStringIfTheSpecifiedValueIsNotEqualToTheSwitchExpression() {
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')->will($this->returnValue('someValue'));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')->will($this->returnValue('someValue'));
                $this->assertSame('', $this->viewHelper->render('someOtherValue'));
        }
 
@@ -94,12 +94,12 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
                $this->viewHelperVariableContainer->expects(
                        $this->atLeastOnce())
                        ->method('exists')
-                       ->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')
+                       ->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')
                        ->will($this->returnValue(TRUE)
                        );
                $this->viewHelperVariableContainer->expects(
                        $this->atLeastOnce())->method('get')
-                       ->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')
+                       ->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')
                        ->will($this->returnValue(NULL)
                        );
 
@@ -117,7 +117,7 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
                $this->viewHelperVariableContainer->expects(
                        $this->atLeastOnce())
                        ->method('exists')
-                       ->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')
+                       ->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')
                        ->will($this->returnValue(TRUE)
                        );
                $this->viewHelperVariableContainer->expects($this->never())->method('get');
@@ -132,12 +132,12 @@ class CaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
                $this->viewHelperVariableContainer->expects(
                        $this->atLeastOnce())
                        ->method('exists')
-                       ->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')
+                       ->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')
                        ->will($this->returnValue(TRUE)
                        );
                $this->viewHelperVariableContainer->expects(
                        $this->atLeastOnce())->method('get')
-                       ->with('TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper', 'switchExpression')
+                       ->with(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression')
                        ->will($this->returnValue('someValue')
                        );
 
index a9eaf08..4ae47c6 100644 (file)
@@ -23,7 +23,7 @@ class CountViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHe
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\CountViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\CountViewHelper::class, array('renderChildren'));
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
        }
index 3e6fa87..10f4cf5 100644 (file)
@@ -23,7 +23,7 @@ class CycleViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHe
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\CycleViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\CycleViewHelper::class, array('renderChildren'));
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
        }
index b3568f0..d12775d 100644 (file)
@@ -20,7 +20,7 @@ class ElseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderRendersChildren() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\ElseViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class, array('renderChildren'));
 
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('foo'));
                $actualResult = $viewHelper->render();
index b092e35..bd1078d 100644 (file)
@@ -33,14 +33,14 @@ class FlashMessagesViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelper
         */
        public function setUp() {
                /** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue|\PHPUnit_Framework_MockObject_MockObject $mockFlashMessagingQueue */
-               $mockFlashMessagingQueue = $this->getMock('TYPO3\\CMS\\Core\\Messaging\\FlashMessageQueue', array('getAllMessagesAndFlush'), array('foo'));
+               $mockFlashMessagingQueue = $this->getMock(\TYPO3\CMS\Core\Messaging\FlashMessageQueue::class, array('getAllMessagesAndFlush'), array('foo'));
                $mockFlashMessagingQueue->expects($this->once())->method('getAllMessagesAndFlush')->will($this->returnValue(array()));
 
-               $mockControllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE);
+               $mockControllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', FALSE);
                $mockControllerContext->expects($this->any())->method('getFlashMessageQueue')->will($this->returnValue($mockFlashMessagingQueue));
 
-               $this->mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder');
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FlashMessagesViewHelper', array('dummy'));
+               $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('controllerContext', $mockControllerContext);
                $this->viewHelper->_set('tag', $this->mockTagBuilder);
                $this->viewHelper->initialize();
index 43b75ef..0a72f42 100644 (file)
@@ -20,7 +20,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function ifAnAttributeValueIsAnObjectMaintainedByThePersistenceManagerItIsConvertedToAUID() {
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnValue('6f487e40-4483-11de-8a39-0800200c9a66'));
 
                $className = 'Object' . uniqid();
@@ -31,7 +31,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
                $object = $this->getMock($fullClassName);
                $object->expects($this->any())->method('FLOW3_Persistence_isNew')->will($this->returnValue(FALSE));
 
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('dummy'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->_set('persistenceManager', $mockPersistenceManager);
 
@@ -47,13 +47,13 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function getNameBuildsNameFromFieldNamePrefixFormObjectNameAndPropertyIfInObjectAccessorMode() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName')->will($this->returnValue('myObjectName'));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName')->will($this->returnValue('myObjectName'));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
 
                $arguments = array('name' => 'fieldName', 'value' => 'fieldValue', 'property' => 'bla');
                $formViewHelper->_set('arguments', $arguments);
@@ -66,13 +66,13 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function getNameBuildsNameFromFieldNamePrefixFormObjectNameAndHierarchicalPropertyIfInObjectAccessorMode() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName')->will($this->returnValue('myObjectName'));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName')->will($this->returnValue('myObjectName'));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
 
                $arguments = array('name' => 'fieldName', 'value' => 'fieldValue', 'property' => 'bla.blubb');
                $formViewHelper->_set('arguments', $arguments);
@@ -85,13 +85,13 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function getNameBuildsNameFromFieldNamePrefixAndPropertyIfInObjectAccessorModeAndNoFormObjectNameIsSpecified() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName')->will($this->returnValue(NULL));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName')->will($this->returnValue(NULL));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
 
                $arguments = array('name' => 'fieldName', 'value' => 'fieldValue', 'property' => 'bla');
                $formViewHelper->_set('arguments', $arguments);
@@ -104,12 +104,12 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function getNameBuildsNameFromFieldNamePrefixAndFieldNameIfNotInObjectAccessorMode() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(FALSE));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
 
                $arguments = array('name' => 'fieldName', 'value' => 'fieldValue', 'property' => 'bla');
                $formViewHelper->_set('arguments', $arguments);
@@ -122,7 +122,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function getValueBuildsValueFromPropertyAndFormObjectIfInObjectAccessorMode() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode', 'addAdditionalIdentityPropertiesIfNeeded'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode', 'addAdditionalIdentityPropertiesIfNeeded'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
                $className = 'test_' . uniqid();
@@ -140,8 +140,8 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
 
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE));
                $formViewHelper->expects($this->once())->method('addAdditionalIdentityPropertiesIfNeeded');
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')->will($this->returnValue($mockObject));
-               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')->will($this->returnValue($mockObject));
+               $this->viewHelperVariableContainer->expects($this->atLeastOnce())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')->will($this->returnValue(TRUE));
 
                $arguments = array('name' => NULL, 'value' => NULL, 'property' => 'value.something');
                $formViewHelper->_set('arguments', $arguments);
@@ -154,7 +154,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function getValueReturnsNullIfNotInObjectAccessorModeAndValueArgumentIsNoSet() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(FALSE));
 
@@ -168,7 +168,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function getValueReturnsValueArgumentIfSpecified() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(FALSE));
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
@@ -184,10 +184,10 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
        public function getValueConvertsObjectsToIdentifiersByDefault() {
                $mockObject = $this->getMock('stdClass');
 
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->atLeastOnce())->method('getIdentifierByObject')->with($mockObject)->will($this->returnValue('6f487e40-4483-11de-8a39-0800200c9a66'));
 
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(FALSE));
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->_set('persistenceManager', $mockPersistenceManager);
@@ -204,10 +204,10 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
        public function getValueDoesNotConvertObjectsIfConvertObjectsIsFalse() {
                $mockObject = $this->getMock('stdClass');
 
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnValue('6f487e40-4483-11de-8a39-0800200c9a66'));
 
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('isObjectAccessorMode'), array(), '', FALSE);
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(FALSE));
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->_set('persistenceManager', $mockPersistenceManager);
@@ -222,10 +222,10 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function isObjectAccessorModeReturnsTrueIfPropertyIsSetAndFormObjectIsGiven() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('dummy'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
-               $this->viewHelperVariableContainer->expects($this->once())->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->once())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName')->will($this->returnValue(TRUE));
 
                $formViewHelper->_set('arguments', array('name' => NULL, 'value' => NULL, 'property' => 'bla'));
                $this->assertTrue($formViewHelper->_call('isObjectAccessorMode'));
@@ -238,7 +238,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function addAdditionalIdentityPropertiesIfNeededDoesNotCreateAnythingIfPropertyIsWithoutDot() {
-               $formFieldViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('renderHiddenIdentityField'), array(), '', FALSE);
+               $formFieldViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('renderHiddenIdentityField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formFieldViewHelper);
                $arguments = array('property' => 'simple');
                $formFieldViewHelper->expects($this->any())->method('renderHiddenIdentityField')->will($this->throwException(new \Exception('Should not be executed!!!')));
@@ -266,13 +266,13 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
                $objectName = 'myObject';
                $expectedProperty = 'myObject[value]';
 
-               $formFieldViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('renderHiddenIdentityField'), array(), '', FALSE);
+               $formFieldViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('renderHiddenIdentityField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formFieldViewHelper);
                $arguments = array('property' => $property);
                $formFieldViewHelper->_set('arguments', $arguments);
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')->will($this->returnValue($mockFormObject));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName')->will($this->returnValue($objectName));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')->will($this->returnValue($mockFormObject));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName')->will($this->returnValue($objectName));
 
                $formFieldViewHelper->expects($this->once())->method('renderHiddenIdentityField')->with($mockFormObject, $expectedProperty);
 
@@ -300,13 +300,13 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
                $expectedProperty1 = 'myObject[value]';
                $expectedProperty2 = 'myObject[value][value]';
 
-               $formFieldViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('renderHiddenIdentityField'), array(), '', FALSE);
+               $formFieldViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('renderHiddenIdentityField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formFieldViewHelper);
                $arguments = array('property' => $property);
                $formFieldViewHelper->_set('arguments', $arguments);
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')->will($this->returnValue($mockFormObject));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName')->will($this->returnValue($objectName));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')->will($this->returnValue($mockFormObject));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName')->will($this->returnValue($objectName));
 
                $formFieldViewHelper->expects($this->at(0))->method('renderHiddenIdentityField')->with($mockFormObject, $expectedProperty1);
                $formFieldViewHelper->expects($this->at(1))->method('renderHiddenIdentityField')->with($mockFormObject, $expectedProperty2);
@@ -318,11 +318,11 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderHiddenFieldForEmptyValueRendersHiddenFieldIfItHasNotBeenRenderedBefore() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('getName'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName'));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array()));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(array()));
                $expected = '<input type="hidden" name="SomeFieldName" value="" />';
                $actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
                $this->assertEquals($expected, $actual);
@@ -332,12 +332,12 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderHiddenFieldForEmptyValueAddsHiddenFieldNameToVariableContainerIfItHasBeenRendered() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('getName'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('NewFieldName'));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array('OldFieldName')));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields', array('OldFieldName', 'NewFieldName'));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(array('OldFieldName')));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields', array('OldFieldName', 'NewFieldName'));
                $formViewHelper->_call('renderHiddenFieldForEmptyValue');
        }
 
@@ -345,11 +345,11 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderHiddenFieldForEmptyValueDoesNotRenderHiddenFieldIfItHasBeenRenderedBefore() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('getName'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName'));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array('SomeFieldName')));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(array('SomeFieldName')));
                $this->viewHelperVariableContainer->expects($this->never())->method('addOrUpdate');
                $expected = '';
                $actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
@@ -360,12 +360,12 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderHiddenFieldForEmptyValueRemovesEmptySquareBracketsFromHiddenFieldName() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('getName'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName[WithBrackets][]'));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array()));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields', array('SomeFieldName[WithBrackets]'));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(array()));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields', array('SomeFieldName[WithBrackets]'));
                $expected = '<input type="hidden" name="SomeFieldName[WithBrackets]" value="" />';
                $actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
                $this->assertEquals($expected, $actual);
@@ -375,12 +375,12 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         * @test
         */
        public function renderHiddenFieldForEmptyValueDoesNotRemoveNonEmptySquareBracketsFromHiddenFieldName() {
-               $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+               $formViewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::class, array('getName'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
                $formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName[WithBrackets][foo]'));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array()));
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields', array('SomeFieldName[WithBrackets][foo]'));
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields')->will($this->returnValue(array()));
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'renderedHiddenFields', array('SomeFieldName[WithBrackets][foo]'));
                $expected = '<input type="hidden" name="SomeFieldName[WithBrackets][foo]" value="" />';
                $actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
                $this->assertEquals($expected, $actual);
index a25d922..ee2b136 100644 (file)
@@ -32,12 +32,12 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
        public function renderHiddenIdentityFieldReturnsAHiddenInputFieldContainingTheObjectsUID() {
                $className = 'Object' . uniqid();
                $fullClassName = '\\TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\' . $className;
-               eval('namespace TYPO3\\CMS\\Fluid\\ViewHelpers\\Form; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+               eval('namespace TYPO3\\CMS\\Fluid\\ViewHelpers\\Form; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                }');
                $object = $this->getAccessibleMock($fullClassName, array('dummy'));
                $object->_set('uid', 123);
                $expectedResult = chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />' . chr(10);
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('prefixFieldName', 'registerFieldNameForFormTokenGeneration'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('prefixFieldName', 'registerFieldNameForFormTokenGeneration'), array(), '', FALSE);
                $viewHelper->expects($this->any())->method('prefixFieldName')->with('theName')->will($this->returnValue('prefix[theName]'));
                $actualResult = $viewHelper->_call('renderHiddenIdentityField', $object, 'theName');
                $this->assertSame($expectedResult, $actualResult);
@@ -54,7 +54,7 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
                $object->_set('uid', 123);
                $object = clone $object;
                $expectedResult = chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />' . chr(10);
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('prefixFieldName', 'registerFieldNameForFormTokenGeneration'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('prefixFieldName', 'registerFieldNameForFormTokenGeneration'), array(), '', FALSE);
                $viewHelper->expects($this->any())->method('prefixFieldName')->with('theName')->will($this->returnValue('prefix[theName]'));
                $actualResult = $viewHelper->_call('renderHiddenIdentityField', $object, 'theName');
                $this->assertSame($expectedResult, $actualResult);
@@ -64,7 +64,7 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
         * @test
         */
        public function prefixFieldNameReturnsEmptyStringIfGivenFieldNameIsNULL() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormViewHelper', array('dummy'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $this->assertSame('', $viewHelper->_call('prefixFieldName', NULL));
        }
@@ -73,7 +73,7 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
         * @test
         */
        public function prefixFieldNameReturnsEmptyStringIfGivenFieldNameIsEmpty() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormViewHelper', array('dummy'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $this->assertSame('', $viewHelper->_call('prefixFieldName', ''));
        }
@@ -82,10 +82,10 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
         * @test
         */
        public function prefixFieldNameReturnsGivenFieldNameIfFieldNamePrefixIsEmpty() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormViewHelper', array('dummy'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
-               $this->viewHelperVariableContainer->expects($this->any())->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(''));
+               $this->viewHelperVariableContainer->expects($this->any())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(''));
                $this->assertSame('someFieldName', $viewHelper->_call('prefixFieldName', 'someFieldName'));
        }
 
@@ -93,10 +93,10 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
         * @test
         */
        public function prefixFieldNamePrefixesGivenFieldNameWithFieldNamePrefix() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormViewHelper', array('dummy'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
-               $this->viewHelperVariableContainer->expects($this->any())->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('somePrefix'));
+               $this->viewHelperVariableContainer->expects($this->any())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue('somePrefix'));
                $this->assertSame('somePrefix[someFieldName]', $viewHelper->_call('prefixFieldName', 'someFieldName'));
        }
 
@@ -104,10 +104,10 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
         * @test
         */
        public function prefixFieldNamePreservesSquareBracketsOfFieldName() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormViewHelper', array('dummy'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
-               $this->viewHelperVariableContainer->expects($this->any())->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('somePrefix[foo]'));
+               $this->viewHelperVariableContainer->expects($this->any())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->will($this->returnValue('somePrefix[foo]'));
                $this->assertSame('somePrefix[foo][someFieldName][bar]', $viewHelper->_call('prefixFieldName', 'someFieldName[bar]'));
        }
 }
index 09030d8..f87c894 100644 (file)
@@ -23,7 +23,7 @@ class ButtonViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\ButtonViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\ButtonViewHelper::class, array('renderChildren'));
                $this->arguments['name'] = '';
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
@@ -33,7 +33,7 @@ class ButtonViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @test
         */
        public function renderCorrectlySetsTagNameAndDefaultAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute', 'setContent'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute', 'setContent'));
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('button');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'submit');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', '');
index f84dc8d..1ad98f1 100644 (file)
@@ -23,7 +23,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\CheckboxViewHelper', array('setErrorClassAttribute', 'getName', 'getValue', 'isObjectAccessorMode', 'getPropertyValue', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper::class, array('setErrorClassAttribute', 'getName', 'getValue', 'isObjectAccessorMode', 'getPropertyValue', 'registerFieldNameForFormTokenGeneration'));
                $this->arguments['property'] = '';
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
@@ -33,7 +33,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsTagNameAndDefaultAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('input');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
@@ -52,7 +52,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderSetsCheckedAttributeIfSpecified() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('value', 'bar');
@@ -70,7 +70,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderIgnoresValueOfBoundPropertyIfCheckedIsSet() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('value', 'bar');
@@ -90,7 +90,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsCheckedAttributeIfCheckboxIsBoundToAPropertyOfTypeBoolean() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('value', 'bar');
@@ -110,7 +110,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderAppendsSquareBracketsToNameAttributeIfBoundToAPropertyOfTypeArray() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo[]');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('foo[]');
@@ -130,7 +130,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsCheckedAttributeIfCheckboxIsBoundToAPropertyOfTypeArray() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo[]');
                $mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('value', 'bar');
@@ -150,7 +150,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsCheckedAttributeIfCheckboxIsBoundToAPropertyOfTypeArrayObject() {
-               $mockTagBuilder = $this->getMock('TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo[]');
                $mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('value', 'bar');
@@ -170,7 +170,7 @@ class CheckboxViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderSetsCheckedAttributeIfBoundPropertyIsNotNull() {
-               $mockTagBuilder = $this->getMock('TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'checkbox');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('value', 'bar');
index 13f2600..59f79e5 100644 (file)
@@ -36,7 +36,7 @@ abstract class FormFieldViewHelperBaseTestcase extends \TYPO3\CMS\Fluid\Tests\Un
         */
        public function setUp() {
                parent::setUp();
-               $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $this->mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
        }
 
        /**
index 3a0897b..ea3317d 100644 (file)
@@ -23,7 +23,7 @@ class HiddenViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\HiddenViewHelper', array('setErrorClassAttribute', 'getName', 'getValue', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\HiddenViewHelper::class, array('setErrorClassAttribute', 'getName', 'getValue', 'registerFieldNameForFormTokenGeneration'));
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
        }
@@ -32,7 +32,7 @@ class HiddenViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @test
         */
        public function renderCorrectlySetsTagNameAndDefaultAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('input');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'hidden');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
index d1b2cf5..36441e5 100644 (file)
@@ -23,7 +23,7 @@ class PasswordViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\PasswordViewHelper', array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper::class, array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
                $this->arguments['name'] = '';
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
@@ -33,7 +33,7 @@ class PasswordViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsTagName() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('input');
                $this->viewHelper->_set('tag', $mockTagBuilder);
 
@@ -45,7 +45,7 @@ class PasswordViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsTypeNameAndValueAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('type', 'password');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('name', 'NameOfTextbox');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('NameOfTextbox');
index 94b044d..e1d73ab 100644 (file)
@@ -23,7 +23,7 @@ class RadioViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\F
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\RadioViewHelper', array('setErrorClassAttribute', 'getName', 'getValue', 'isObjectAccessorMode', 'getPropertyValue', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\RadioViewHelper::class, array('setErrorClassAttribute', 'getName', 'getValue', 'isObjectAccessorMode', 'getPropertyValue', 'registerFieldNameForFormTokenGeneration'));
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
        }
@@ -32,7 +32,7 @@ class RadioViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\F
         * @test
         */
        public function renderCorrectlySetsTagNameAndDefaultAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('input');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'radio');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
@@ -51,7 +51,7 @@ class RadioViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\F
         * @test
         */
        public function renderSetsCheckedAttributeIfSpecified() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'radio');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('foo');
@@ -70,7 +70,7 @@ class RadioViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\F
         * @test
         */
        public function renderIgnoresBoundPropertyIfCheckedIsSet() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'radio');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('value', 'bar');
@@ -90,7 +90,7 @@ class RadioViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\F
         * @test
         */
        public function renderCorrectlySetsCheckedAttributeIfCheckboxIsBoundToAPropertyOfTypeBoolean() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'radio');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('foo');
@@ -111,7 +111,7 @@ class RadioViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\F
         * @test
         */
        public function renderDoesNotAppendSquareBracketsToNameAttributeIfBoundToAPropertyOfTypeArray() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'radio');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('foo');
@@ -131,7 +131,7 @@ class RadioViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\F
         * @test
         */
        public function renderCorrectlySetsCheckedAttributeIfCheckboxIsBoundToAPropertyOfTypeString() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'radio');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'foo');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('foo');
index 75a2582..7ef588b 100644 (file)
@@ -37,7 +37,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
                );
                $this->arguments['name'] = '';
                $this->arguments['sortByOptionLabel'] = FALSE;
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\SelectViewHelper', array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelper::class, array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
        }
 
        public function tearDown() {
@@ -210,7 +210,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @test
         */
        public function selectOnDomainObjectsCreatesExpectedOptions() {
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnValue(NULL));
                $this->viewHelper->_set('persistenceManager', $mockPersistenceManager);
 
@@ -278,7 +278,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         */
        public function multipleSelectOnDomainObjectsCreatesExpectedOptionsWithoutOptionValueField() {
                /** @var $mockPersistenceManager \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface */
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnCallback(
                        function ($object) {
                                return $object->getId();
@@ -317,7 +317,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @test
         */
        public function selectWithoutFurtherConfigurationOnDomainObjectsUsesUuidForValueAndLabel() {
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnValue('fakeUID'));
                $this->viewHelper->_set('persistenceManager', $mockPersistenceManager);
 
@@ -342,7 +342,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @test
         */
        public function selectWithoutFurtherConfigurationOnDomainObjectsUsesToStringForLabelIfAvailable() {
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnValue('fakeUID'));
                $this->viewHelper->_set('persistenceManager', $mockPersistenceManager);
 
@@ -351,7 +351,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
                $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="fakeUID">toStringResult</option>' . chr(10));
                $this->tagBuilder->expects($this->once())->method('render');
 
-               $user = $this->getMock('TYPO3\\CMS\\Fluid\\Tests\\Unit\\ViewHelpers\\Form\\Fixtures\\UserDomainClass', array('__toString'), array(1, 'Ingmar', 'Schlecht'));
+               $user = $this->getMock(\TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\UserDomainClass::class, array('__toString'), array(1, 'Ingmar', 'Schlecht'));
                $user->expects($this->atLeastOnce())->method('__toString')->will($this->returnValue('toStringResult'));
 
                $this->arguments['options'] = array(
@@ -369,7 +369,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @expectedException \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
         */
        public function selectOnDomainObjectsThrowsExceptionIfNoValueCanBeFound() {
-               $mockPersistenceManager = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface');
+               $mockPersistenceManager = $this->getMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
                $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnValue(NULL));
                $this->viewHelper->_set('persistenceManager', $mockPersistenceManager);
 
index a889d6b..c6dcf1b 100644 (file)
@@ -23,7 +23,7 @@ class SubmitViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\SubmitViewHelper', array('dummy'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper::class, array('dummy'));
                $this->arguments['name'] = '';
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
@@ -33,7 +33,7 @@ class SubmitViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @test
         */
        public function renderCorrectlySetsTagNameAndDefaultAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName', 'addAttribute'));
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute'));
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('input');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'submit');
 
index e7ef502..ed85065 100644 (file)
@@ -23,7 +23,7 @@ class TextareaViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\TextareaViewHelper', array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\TextareaViewHelper::class, array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
                $this->arguments['name'] = '';
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
@@ -33,7 +33,7 @@ class TextareaViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsTagName() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('textarea');
                $this->viewHelper->_set('tag', $mockTagBuilder);
 
@@ -45,7 +45,7 @@ class TextareaViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderCorrectlySetsNameAttributeAndContent() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('addAttribute')->with('name', 'NameOfTextarea');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('NameOfTextarea');
                $mockTagBuilder->expects($this->once())->method('setContent')->with('Current value');
@@ -75,7 +75,7 @@ class TextareaViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderEscapesTextareaContent() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('addAttribute')->with('name', 'NameOfTextarea');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('NameOfTextarea');
                $mockTagBuilder->expects($this->once())->method('setContent')->with('some &lt;tag&gt; &amp; &quot;quotes&quot;');
@@ -97,7 +97,7 @@ class TextareaViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         * @test
         */
        public function renderAddsPlaceholder() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('placeholder', 'SomePlaceholder');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('name', 'NameOfTextarea');
                $mockTagBuilder->expects($this->once())->method('render');
index 7f6625c..67c1f49 100644 (file)
@@ -23,7 +23,7 @@ class TextfieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Fo
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\TextfieldViewHelper', array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\TextfieldViewHelper::class, array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
                $this->arguments['name'] = '';
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
@@ -33,7 +33,7 @@ class TextfieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Fo
         * @test
         */
        public function renderCorrectlySetsTagName() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('setTagName'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName'), array(), '', FALSE);
                $mockTagBuilder->expects($this->once())->method('setTagName')->with('input');
                $this->viewHelper->_set('tag', $mockTagBuilder);
 
@@ -45,7 +45,7 @@ class TextfieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Fo
         * @test
         */
        public function renderCorrectlySetsTypeNameAndValueAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('type', 'text');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('name', 'NameOfTextfield');
                $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('NameOfTextfield');
@@ -77,7 +77,7 @@ class TextfieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Fo
         * @test
         */
        public function renderAddsPlaceholder() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('placeholder', 'SomePlaceholder');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('type', 'text');
                $mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('name', 'NameOfTextfield');
index 41ab8ce..89c32db 100644 (file)
@@ -23,7 +23,7 @@ class UploadViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\UploadViewHelper', array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
+               $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\UploadViewHelper::class, array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
                $this->arguments['name'] = '';
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
@@ -43,7 +43,7 @@ class UploadViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         * @test
         */
        public function renderCorrectlySetsTypeNameAndValueAttributes() {
-               $mockTagBuilder = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+               $mockTagBuilder = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder::class, array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('type', 'file');
                $mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('name', 'someName');
                $this->viewHelper->expects($this->at(0))->method('registerFieldNameForFormTokenGeneration')->with('someName[name]');
index 5b58060..1e24e50 100644 (file)
@@ -38,8 +38,8 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
 
        public function setUp() {
                parent::setUp();
-               $this->mockExtensionService = $this->getMock('TYPO3\\CMS\\Extbase\\Service\\ExtensionService');
-               $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $this->mockExtensionService = $this->getMock(\TYPO3\CMS\Extbase\Service\ExtensionService::class);
+               $this->mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
        }
 
        /**
@@ -49,7 +49,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
        protected function injectDependenciesIntoViewHelper(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper) {
                $viewHelper->_set('configurationManager', $this->mockConfigurationManager);
                parent::injectDependenciesIntoViewHelper($viewHelper);
-               $hashService = $this->getMock('TYPO3\CMS\Extbase\Security\Cryptography\HashService', array('appendHmac'));
+               $hashService = $this->getMock(\TYPO3\CMS\Extbase\Security\Cryptography\HashService::class, array('appendHmac'));
                $hashService->expects($this->any())->method('appendHmac')->will($this->returnValue(''));
                $this->mvcPropertyMapperConfigurationService->_set('hashService', $hashService);
                $viewHelper->_set('mvcPropertyMapperConfigurationService', $this->mvcPropertyMapperConfigurationService);
@@ -61,13 +61,13 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         */
        public function renderAddsObjectToViewHelperVariableContainer() {
                $formObject = new \stdClass();
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectNameToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectNameFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectNameToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectNameFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->setArguments(array('object' => $formObject));
-               $this->viewHelperVariableContainer->expects($this->at(0))->method('add')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject', $formObject);
-               $this->viewHelperVariableContainer->expects($this->at(1))->method('add')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties', array());
-               $this->viewHelperVariableContainer->expects($this->at(2))->method('remove')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject');
-               $this->viewHelperVariableContainer->expects($this->at(3))->method('remove')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties');
+               $this->viewHelperVariableContainer->expects($this->at(0))->method('add')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject', $formObject);
+               $this->viewHelperVariableContainer->expects($this->at(1))->method('add')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties', array());
+               $this->viewHelperVariableContainer->expects($this->at(2))->method('remove')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject');
+               $this->viewHelperVariableContainer->expects($this->at(3))->method('remove')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties');
                $viewHelper->render();
        }
 
@@ -76,11 +76,11 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         */
        public function renderAddsObjectNameToTemplateVariableContainer() {
                $objectName = 'someObjectName';
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->setArguments(array('name' => $objectName));
-               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName', $objectName);
-               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName');
+               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName', $objectName);
+               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName');
                $viewHelper->render();
        }
 
@@ -89,11 +89,11 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         */
        public function formObjectNameArgumentOverrulesNameArgument() {
                $objectName = 'someObjectName';
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->setArguments(array('name' => 'formName', 'objectName' => $objectName));
-               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName', $objectName);
-               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName');
+               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName', $objectName);
+               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObjectName');
                $viewHelper->render();
        }
 
@@ -101,7 +101,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderCallsRenderHiddenReferrerFields() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderRequestHashField', 'renderHiddenReferrerFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderRequestHashField', 'renderHiddenReferrerFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $viewHelper->expects($this->once())->method('renderHiddenReferrerFields');
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->render();
@@ -112,7 +112,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         */
        public function renderCallsRenderHiddenIdentityField() {
                $object = new \stdClass();
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderRequestHashField', 'renderHiddenReferrerFields', 'renderHiddenIdentityField', 'getFormObjectName', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderRequestHashField', 'renderHiddenReferrerFields', 'renderHiddenIdentityField', 'getFormObjectName', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->setArguments(array('object' => $object));
                $viewHelper->expects($this->atLeastOnce())->method('getFormObjectName')->will($this->returnValue('MyName'));
@@ -124,7 +124,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderCallsRenderAdditionalIdentityFields() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderRequestHashField', 'renderHiddenReferrerFields', 'renderAdditionalIdentityFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderRequestHashField', 'renderHiddenReferrerFields', 'renderAdditionalIdentityFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $viewHelper->expects($this->once())->method('renderAdditionalIdentityFields');
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->render();
@@ -134,7 +134,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderWrapsHiddenFieldsWithDivForXhtmlCompatibilityWithRewrittenPropertyMapper() {
-               $viewHelper = $this->getAccessibleMock($this->buildAccessibleProxy('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper'), array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock($this->buildAccessibleProxy(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class), array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->mvcPropertyMapperConfigurationService->_set('hashService', new \TYPO3\CMS\Extbase\Security\Cryptography\HashService());
                $viewHelper->_set('mvcPropertyMapperConfigurationService', $this->mvcPropertyMapperConfigurationService);
                parent::injectDependenciesIntoViewHelper($viewHelper);
@@ -151,7 +151,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderWrapsHiddenFieldsWithDivAndAnAdditionalClassForXhtmlCompatibilityWithRewrittenPropertyMapper() {
-               $viewHelper = $this->getMock($this->buildAccessibleProxy('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper'), array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getMock($this->buildAccessibleProxy(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class), array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->mvcPropertyMapperConfigurationService->_set('hashService', new \TYPO3\CMS\Extbase\Security\Cryptography\HashService());
                $viewHelper->_set('mvcPropertyMapperConfigurationService', $this->mvcPropertyMapperConfigurationService);
                parent::injectDependenciesIntoViewHelper($viewHelper);
@@ -173,9 +173,9 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
                        'object1[object2]' => '<input type="hidden" name="object1[object2][__identity]" value="42" />',
                        'object1[object2][subobject]' => '<input type="hidden" name="object1[object2][subobject][__identity]" value="21" />'
                );
-               $this->viewHelperVariableContainer->expects($this->once())->method('exists')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties')->will($this->returnValue(TRUE));
-               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties')->will($this->returnValue($identityProperties));
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren'), array(), '', FALSE);
+               $this->viewHelperVariableContainer->expects($this->once())->method('exists')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties')->will($this->returnValue(TRUE));
+               $this->viewHelperVariableContainer->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'additionalIdentityProperties')->will($this->returnValue($identityProperties));
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $expected = chr(10) . '<input type="hidden" name="object1[object2][__identity]" value="42" />' . chr(10) . '<input type="hidden" name="object1[object2][subobject][__identity]" value="21" />';
                $actual = $viewHelper->_call('renderAdditionalIdentityFields');
@@ -186,7 +186,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @test
         */
        public function renderHiddenReferrerFieldsAddCurrentControllerAndActionAsHiddenFields() {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('dummy'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $this->request->expects($this->atLeastOnce())->method('getControllerExtensionName')->will($this->returnValue('extensionName'));
                $this->request->expects($this->never())->method('getControllerSubextensionName');
@@ -202,11 +202,11 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         */
        public function renderAddsSpecifiedPrefixToTemplateVariableContainer() {
                $prefix = 'somePrefix';
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->setArguments(array('fieldNamePrefix' => $prefix));
-               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix', $prefix);
-               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix');
+               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix', $prefix);
+               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix');
                $viewHelper->render();
        }
 
@@ -215,13 +215,13 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         */
        public function renderAddsDefaultFieldNamePrefixToTemplateVariableContainerIfNoPrefixIsSpecified() {
                $expectedPrefix = 'tx_someextension_someplugin';
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer', 'renderTrustedPropertiesField'), array(), '', FALSE);
                $this->mockExtensionService->expects($this->once())->method('getPluginNamespace')->with('SomeExtension', 'SomePlugin')->will($this->returnValue('tx_someextension_someplugin'));
                $viewHelper->_set('extensionService', $this->mockExtensionService);
                $this->injectDependenciesIntoViewHelper($viewHelper);
                $viewHelper->setArguments(array('extensionName' => 'SomeExtension', 'pluginName' => 'SomePlugin'));
-               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix', $expectedPrefix);
-               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'fieldNamePrefix');
+               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix', $expectedPrefix);
+               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix');
                $viewHelper->render();
        }
 
@@ -264,7 +264,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel
         * @dataProvider argumentsForPostProcessUriArgumentsForRequestHash
         */
        public function postProcessUriArgumentsForRequestHashWorks($arguments, $expectedResults) {
-               $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('dummy'), array(), '', FALSE);
+               $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, array('dummy'), array(), '', FALSE);
                $results = array();
                $viewHelper->_callRef('postProcessUriArgumentsForRequestHash', $arguments, $results);
                $this->assertEquals($expectedResults, $results);
index 5097f9b..cf6ea2e 100644 (file)
@@ -22,7 +22,7 @@ class BytesViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getMock('TYPO3\CMS\Fluid\ViewHelpers\Format\BytesViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\BytesViewHelper::class, array('renderChildren'));
        }
 
        /**
index 5fc7caf..8815e3b 100644 (file)
@@ -43,10 +43,10 @@ class CropViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
        public function setUp() {
                parent::setUp();
-               $this->mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array(), array(), '', FALSE);
-               $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $this->mockContentObject = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, array(), array(), '', FALSE);
+               $this->mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $this->mockConfigurationManager->expects($this->any())->method('getContentObject')->will($this->returnValue($this->mockContentObject));
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CropViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CropViewHelper::class, array('renderChildren'));
                $this->viewHelper->injectConfigurationManager($this->mockConfigurationManager);
                $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Some Content'));
        }
index adacc7e..1dd3980 100644 (file)
@@ -20,7 +20,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRoundsFloatCorrectly() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(123.456));
                $actualResult = $viewHelper->render();
                $this->assertEquals('123,46', $actualResult);
@@ -30,7 +30,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersCurrencySign() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(123));
                $actualResult = $viewHelper->render('foo');
                $this->assertEquals('123,00 foo', $actualResult);
@@ -40,7 +40,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersPrependedCurrencySign() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(123));
                $actualResult = $viewHelper->render('foo', ',', '.', TRUE);
                $this->assertEquals('foo 123,00', $actualResult);
@@ -50,7 +50,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRespectsCurrencySeparator() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(123));
                $actualResult = $viewHelper->render('foo', ',', '.', TRUE, FALSE);
                $this->assertEquals('foo123,00', $actualResult);
@@ -60,7 +60,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRespectsDecimalSeparator() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(12345));
                $actualResult = $viewHelper->render('', '|');
                $this->assertEquals('12.345|00', $actualResult);
@@ -70,7 +70,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRespectsThousandsSeparator() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(12345));
                $actualResult = $viewHelper->render('', ',', '|');
                $this->assertEquals('12|345,00', $actualResult);
@@ -80,7 +80,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersNullValues() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
                $actualResult = $viewHelper->render();
                $this->assertEquals('0,00', $actualResult);
@@ -90,7 +90,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersEmptyString() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(''));
                $actualResult = $viewHelper->render();
                $this->assertEquals('0,00', $actualResult);
@@ -100,7 +100,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersZeroValues() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(0));
                $actualResult = $viewHelper->render();
                $this->assertEquals('0,00', $actualResult);
@@ -110,7 +110,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersNegativeAmounts() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(-123.456));
                $actualResult = $viewHelper->render();
                $this->assertEquals('-123,46', $actualResult);
@@ -120,7 +120,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersStringsToZeroValueFloat() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('TYPO3'));
                $actualResult = $viewHelper->render();
                $this->assertEquals('0,00', $actualResult);
@@ -130,7 +130,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersCommaValuesToValueBeforeComma() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('12,34.00'));
                $actualResult = $viewHelper->render();
                $this->assertEquals('12,00', $actualResult);
@@ -140,7 +140,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersValuesWithoutDecimals() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('54321'));
                $actualResult = $viewHelper->render('', ',', '.', FALSE, TRUE, 0);
                $this->assertEquals('54.321', $actualResult);
@@ -150,7 +150,7 @@ class CurrencyViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperRendersThreeDecimals() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CurrencyViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('54321'));
                $actualResult = $viewHelper->render('', ',', '.', FALSE, TRUE, 3);
                $this->assertEquals('54.321,000', $actualResult);
index 9ddd7a7..83f5e9e 100644 (file)
@@ -80,7 +80,7 @@ class DateViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function viewHelperReturnsEmptyStringIfNULLIsGiven() {
                /** @var DateViewHelper|\PHPUnit_Framework_MockObject_MockObject $viewHelper */
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\DateViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
                $actualResult = $viewHelper->render();
                $this->assertEquals('', $actualResult);
@@ -120,7 +120,7 @@ class DateViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function viewHelperUsesChildNodesIfDateAttributeIsNotSpecified() {
                /** @var DateViewHelper|\PHPUnit_Framework_MockObject_MockObject $viewHelper */
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\DateViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(new \DateTime('1980-12-13')));
                $actualResult = $viewHelper->render();
                $this->assertEquals('1980-12-13', $actualResult);
@@ -131,7 +131,7 @@ class DateViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function viewHelperUsesChildNodesWithTimestamp() {
                /** @var DateViewHelper|\PHPUnit_Framework_MockObject_MockObject $viewHelper */
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\DateViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('1359891658'));
                $actualResult = $viewHelper->render();
                $this->assertEquals('2013-02-03', $actualResult);
@@ -142,7 +142,7 @@ class DateViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function dateArgumentHasPriorityOverChildNodes() {
                /** @var DateViewHelper|\PHPUnit_Framework_MockObject_MockObject $viewHelper */
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\DateViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->never())->method('renderChildren');
                $actualResult = $viewHelper->render('1980-12-12');
                $this->assertEquals('1980-12-12', $actualResult);
@@ -172,7 +172,7 @@ class DateViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function viewHelperRespectsDefaultTimezoneForIntegerTimestamp($timezone, $expected) {
                /** @var DateViewHelper|\PHPUnit_Framework_MockObject_MockObject $viewHelper */
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\DateViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper::class, array('renderChildren'));
 
                $date = 1359891658; // 2013-02-03 11:40 UTC
                $format = 'Y-m-d H:i';
@@ -218,7 +218,7 @@ class DateViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function viewHelperRespectsDefaultTimezoneForStringTimestamp($timeZone, $date, $expected) {
                /** @var DateViewHelper|\PHPUnit_Framework_MockObject_MockObject $viewHelper */
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\DateViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper::class, array('renderChildren'));
                $format = 'Y-m-d H:i';
 
                date_default_timezone_set($timeZone);
@@ -250,7 +250,7 @@ class DateViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function dateViewHelperFormatsDateLocalized($locale, $expected) {
                /** @var DateViewHelper|\PHPUnit_Framework_MockObject_MockObject $viewHelper */
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\DateViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper::class, array('renderChildren'));
                $format = '%d. %B %Y';
                // 2013-02-03 11:40 UTC
                $timestamp = '@1359891658';
index 3f4c178..c4f4442 100644 (file)
@@ -22,7 +22,7 @@ class HtmlentitiesDecodeViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\HtmlentitiesDecodeViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlentitiesDecodeViewHelper::class, array('renderChildren'));
        }
 
        /**
index 1ac1ada..d2d406a 100644 (file)
@@ -22,7 +22,7 @@ class HtmlentitiesViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\HtmlentitiesViewHelper', array('renderChildren', 'resolveDefaultEncoding'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlentitiesViewHelper::class, array('renderChildren', 'resolveDefaultEncoding'));
                $this->viewHelper->expects($this->any())->method('resolveDefaultEncoding')->will($this->returnValue('UTF-8'));
        }
 
index 0fe5ab7..fe73614 100644 (file)
@@ -22,7 +22,7 @@ class HtmlspecialcharsViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\HtmlspecialcharsViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelper::class, array('renderChildren'));
        }
 
        /**
index a314e3e..468af75 100644 (file)
@@ -20,7 +20,7 @@ class Nl2brViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperDoesNotModifyTextWithoutLineBreaks() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\Nl2brViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\Nl2brViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('<p class="bodytext">Some Text without line breaks</p>'));
                $actualResult = $viewHelper->render();
                $this->assertEquals('<p class="bodytext">Some Text without line breaks</p>', $actualResult);
@@ -30,7 +30,7 @@ class Nl2brViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperConvertsLineBreaksToBRTags() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\Nl2brViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\Nl2brViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(10) . 'Line 2'));
                $actualResult = $viewHelper->render();
                $this->assertEquals('Line 1<br />' . chr(10) . 'Line 2', $actualResult);
@@ -40,7 +40,7 @@ class Nl2brViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperConvertsWindowsLineBreaksToBRTags() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\Nl2brViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\Nl2brViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(13) . chr(10) . 'Line 2'));
                $actualResult = $viewHelper->render();
                $this->assertEquals('Line 1<br />' . chr(13) . chr(10) . 'Line 2', $actualResult);
index 3daa841..c8682cd 100644 (file)
@@ -20,7 +20,7 @@ class NumberViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function formatNumberDefaultsToEnglishNotationWithTwoDecimals() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\NumberViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\NumberViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(10000.0 / 3.0));
                $actualResult = $viewHelper->render();
                $this->assertEquals('3,333.33', $actualResult);
@@ -30,7 +30,7 @@ class NumberViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function formatNumberWithDecimalsDecimalPointAndSeparator() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\NumberViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\NumberViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(10000.0 / 3.0));
                $actualResult = $viewHelper->render(3, ',', '.');
                $this->assertEquals('3.333,333', $actualResult);
index b6f1636..dbaedef 100644 (file)
@@ -20,7 +20,7 @@ class PaddingViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function stringsArePaddedWithBlanksByDefault() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\PaddingViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\PaddingViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('foo'));
                $actualResult = $viewHelper->render(10);
                $this->assertEquals('foo       ', $actualResult);
@@ -30,7 +30,7 @@ class PaddingViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function paddingStringCanBeSpecified() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\PaddingViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\PaddingViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('foo'));
                $actualResult = $viewHelper->render(10, '-=');
                $this->assertEquals('foo-=-=-=-', $actualResult);
@@ -40,7 +40,7 @@ class PaddingViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function stringIsNotTruncatedIfPadLengthIsBelowStringLength() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\PaddingViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\PaddingViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('some long string'));
                $actualResult = $viewHelper->render(5);
                $this->assertEquals('some long string', $actualResult);
@@ -50,7 +50,7 @@ class PaddingViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function integersArePaddedCorrectly() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\PaddingViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\PaddingViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(123));
                $actualResult = $viewHelper->render(5, '0');
                $this->assertEquals('12300', $actualResult);
index 9fa58c6..e9f5013 100644 (file)
@@ -20,7 +20,7 @@ class PrintfViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperCanUseArrayAsArgument() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\PrintfViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\PrintfViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('%04d-%02d-%02d'));
                $actualResult = $viewHelper->render(array('year' => 2009, 'month' => 4, 'day' => 5));
                $this->assertEquals('2009-04-05', $actualResult);
@@ -30,7 +30,7 @@ class PrintfViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function viewHelperCanSwapMultipleArguments() {
-               $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\PrintfViewHelper', array('renderChildren'));
+               $viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\PrintfViewHelper::class, array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('%2$s %1$d %3$s %2$s'));
                $actualResult = $viewHelper->render(array(123, 'foo', 'bar'));
                $this->assertEquals('foo 123 bar foo', $actualResult);
index 4ae881f..d2e5838 100644 (file)
@@ -22,7 +22,7 @@ class RawViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\RawViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\RawViewHelper::class, array('renderChildren'));
        }
 
        /**
index c6646a0..6083d96 100644 (file)
@@ -22,7 +22,7 @@ class StripTagsViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\StripTagsViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\StripTagsViewHelper::class, array('renderChildren'));
        }
 
        /**
index 1765d07..5d4a438 100644 (file)
@@ -22,7 +22,7 @@ class UrlencodeViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $viewHelper;
 
        public function setUp() {
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\UrlencodeViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\Format\UrlencodeViewHelper::class, array('renderChildren'));
        }
 
        /**
index cd48dde..0d31678 100644 (file)
@@ -23,7 +23,7 @@ class GroupedForViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\V
 
        public function setUp() {
                parent::setUp();
-               $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\GroupedForViewHelper', array('renderChildren'));
+               $this->viewHelper = $this->getMock(\TYPO3\CMS\Fluid\ViewHelpers\GroupedForViewHelper::class, array('renderChildren'));
                $this->injectDependenciesIntoViewHelper($this->viewHelper);
                $this->viewHelper->initializeArguments();
        }
@@ -184,7 +184,7 @@ class GroupedForViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\V
                $invoices = array('invoice1' => $invoice1, 'invoice2' => $invoice2, 'invoice3' => $invoice3);
                $groupBy = 'customer.name';
                /** @var \TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\TYPO3\CMS\Fluid\ViewHelpers\GroupedForViewHelper $accessibleMock */
-               $accessibleMock = $this->getAccessibleMock(