[TASK] Use name-resolution instead of strings where possible: 3 56/34856/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Dec 2014 12:47:02 +0000 (13:47 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 2 Dec 2014 01:35:33 +0000 (02:35 +0100)
(part for EXT:extbase)

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: I7ead29b6dd71240c4a05a4bf9b1c501e6a513019
Resolves: #63477
Releases: master
Reviewed-on: http://review.typo3.org/34856
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>
110 files changed:
typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php
typo3/sysext/extbase/Classes/Mvc/Cli/RequestBuilder.php
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php
typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
typo3/sysext/extbase/Classes/Mvc/Controller/CommandController.php
typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfiguration.php
typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php
typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php
typo3/sysext/extbase/Classes/Object/Container/Container.php
typo3/sysext/extbase/Classes/Object/ObjectManager.php
typo3/sysext/extbase/Classes/Object/ObjectManagerException.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Property/PropertyMappingConfigurationBuilder.php
typo3/sysext/extbase/Classes/Property/TypeConverter/CoreTypeConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/DateTimeConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/FileConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/FileReferenceConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/FolderBasedFileCollectionConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/FolderConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectStorageConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/PersistentObjectConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/StaticFileCollectionConverter.php
typo3/sysext/extbase/Classes/Reflection/ReflectionService.php
typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php
typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php
typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php
typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php
typo3/sysext/extbase/Tests/Unit/Configuration/AbstractConfigurationManagerTest.php
typo3/sysext/extbase/Tests/Unit/Configuration/BackendConfigurationManagerTest.php
typo3/sysext/extbase/Tests/Unit/Configuration/FrontendConfigurationManagerTest.php
typo3/sysext/extbase/Tests/Unit/Core/BootstrapTest.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/BackendUserGroupRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/BackendUserRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/CategoryRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/FileMountRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/DomainObject/AbstractEntityTest.php
typo3/sysext/extbase/Tests/Unit/Error/ResultTest.php
typo3/sysext/extbase/Tests/Unit/Hook/DataHandler/CheckFlexFormValueTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Cli/CommandManagerTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Cli/CommandTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Cli/RequestBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Cli/RequestTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/AbstractControllerTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ArgumentTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ArgumentsTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/CommandControllerTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/RequestTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/ResponseTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/View/JsonViewTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/RequestBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Object/Container/ClassInfoFactoryTest.php
typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/BackendTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapFactoryTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryFactoryTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryResultTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/SessionTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Typo3QuerySettingsTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Property/PropertyMapperTest.php
typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/DateTimeConverterTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/FloatConverterTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/IntegerConverterTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/ObjectConverterTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/PersistentObjectConverterTest.php
typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchemaTest.php
typo3/sysext/extbase/Tests/Unit/Scheduler/FieldProviderTest.php
typo3/sysext/extbase/Tests/Unit/Scheduler/TaskTest.php
typo3/sysext/extbase/Tests/Unit/Service/CacheServiceTest.php
typo3/sysext/extbase/Tests/Unit/Service/ExtensionServiceTest.php
typo3/sysext/extbase/Tests/Unit/Service/FlexFormServiceTest.php
typo3/sysext/extbase/Tests/Unit/SignalSlot/DispatcherTest.php
typo3/sysext/extbase/Tests/Unit/Utility/DebuggerUtilityTest.php
typo3/sysext/extbase/Tests/Unit/Utility/ExtensionUtilityTest.php
typo3/sysext/extbase/Tests/Unit/Utility/LocalizationUtilityTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractCompositeValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AlphanumericValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/BooleanValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/CollectionValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/ConjunctionValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/DisjunctionValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/EmailAddressValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/FloatValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/GenericObjectValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/IntegerValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NotEmptyValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NumberRangeValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NumberValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/RawValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/RegularExpressionValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/StringLengthValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/StringValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/TextValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/ValidatorResolverTest.php
typo3/sysext/extbase/ext_localconf.php
typo3/sysext/extbase/ext_tables.php

index 5179d72..ffd7c9b 100644 (file)
@@ -191,8 +191,8 @@ class BackendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abstr
        protected function getContextSpecificFrameworkConfiguration(array $frameworkConfiguration) {
                if (!isset($frameworkConfiguration['mvc']['requestHandlers'])) {
                        $frameworkConfiguration['mvc']['requestHandlers'] = array(
-                               'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler',
-                               'TYPO3\\CMS\\Extbase\\Mvc\\Web\\BackendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\BackendRequestHandler'
+                               \TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::class => \TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::class,
+                               \TYPO3\CMS\Extbase\Mvc\Web\BackendRequestHandler::class => \TYPO3\CMS\Extbase\Mvc\Web\BackendRequestHandler::class
                        );
                }
                return $frameworkConfiguration;
index 129c3a1..a694c26 100644 (file)
@@ -58,7 +58,7 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface {
        public function build($commandLine = '', $callingScript = './typo3/cli_dispatch.phpsh extbase') {
                $request = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class);
                $request->setCallingScript($callingScript);
-               $request->setControllerObjectName('TYPO3\\CMS\\Extbase\\Command\\HelpCommandController');
+               $request->setControllerObjectName(\TYPO3\CMS\Extbase\Command\HelpCommandController::class);
                $rawCommandLineArguments = is_array($commandLine) ? $commandLine : explode(' ', $commandLine);
                if (count($rawCommandLineArguments) === 0) {
                        $request->setControllerCommandName('helpStub');
index 9d8f5c0..61b373f 100644 (file)
@@ -88,7 +88,7 @@ abstract class AbstractController implements ControllerInterface {
         *
         * @var array
         */
-       protected $supportedRequestTypes = array('TYPO3\\CMS\\Extbase\\Mvc\\Request');
+       protected $supportedRequestTypes = array(\TYPO3\CMS\Extbase\Mvc\Request::class);
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
index 16d01a1..40477e7 100644 (file)
@@ -71,7 +71,7 @@ class ActionController extends AbstractController {
         * @var string
         * @api
         */
-       protected $defaultViewObjectName = 'TYPO3\\CMS\\Fluid\\View\\TemplateView';
+       protected $defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class;
 
        /**
         * Name of the action method
index 60106fb..5de2733 100644 (file)
@@ -168,7 +168,7 @@ class CommandController implements CommandControllerInterface {
                        } elseif ($argument->isRequired()) {
                                $commandArgumentDefinition = $this->objectManager->get(CommandArgumentDefinition::class, $argumentName, TRUE, NULL);
                                $exception = new \TYPO3\CMS\Extbase\Mvc\Exception\CommandException('Required argument "' . $commandArgumentDefinition->getDashedName() . '" is not set.', 1306755520);
-                               $this->forward('error', 'TYPO3\\CMS\\Extbase\\Command\\HelpCommandController', array('exception' => $exception));
+                               $this->forward('error', \TYPO3\CMS\Extbase\Command\HelpCommandController::class, array('exception' => $exception));
                        }
                }
        }
index 5b01124..a0a2982 100644 (file)
@@ -37,7 +37,7 @@ class MvcPropertyMappingConfiguration extends \TYPO3\CMS\Extbase\Property\Proper
         * @api
         */
        public function allowCreationForSubProperty($propertyPath) {
-               $this->forProperty($propertyPath)->setTypeConverterOption('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, TRUE);
+               $this->forProperty($propertyPath)->setTypeConverterOption(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, TRUE);
        }
 
        /**
@@ -48,7 +48,7 @@ class MvcPropertyMappingConfiguration extends \TYPO3\CMS\Extbase\Property\Proper
         * @api
         */
        public function allowModificationForSubProperty($propertyPath) {
-               $this->forProperty($propertyPath)->setTypeConverterOption('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, TRUE);
+               $this->forProperty($propertyPath)->setTypeConverterOption(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, TRUE);
        }
 
        /**
@@ -62,6 +62,6 @@ class MvcPropertyMappingConfiguration extends \TYPO3\CMS\Extbase\Property\Proper
         * @api
         */
        public function setTargetTypeForSubProperty($propertyPath, $targetType) {
-               $this->forProperty($propertyPath)->setTypeConverterOption('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_TARGET_TYPE, $targetType);
+               $this->forProperty($propertyPath)->setTypeConverterOption(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_TARGET_TYPE, $targetType);
        }
 }
index f7e360d..40ae58c 100644 (file)
@@ -143,10 +143,10 @@ class MvcPropertyMappingConfigurationService implements \TYPO3\CMS\Core\Singleto
                }
 
                if (isset($propertyConfiguration['__identity'])) {
-                       $propertyMappingConfiguration->setTypeConverterOption('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, TRUE);
+                       $propertyMappingConfiguration->setTypeConverterOption(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, TRUE);
                        unset($propertyConfiguration['__identity']);
                } else {
-                       $propertyMappingConfiguration->setTypeConverterOption('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, TRUE);
+                       $propertyMappingConfiguration->setTypeConverterOption(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, TRUE);
                }
 
                foreach ($propertyConfiguration as $innerKey => $innerValue) {
index a2d92d2..a25c5ff 100644 (file)
@@ -146,7 +146,7 @@ class ClassInfoFactory {
         * @return bool
         */
        private function getIsSingleton($classname) {
-               return in_array('TYPO3\\CMS\\Core\\SingletonInterface', class_implements($classname));
+               return in_array(\TYPO3\CMS\Core\SingletonInterface::class, class_implements($classname));
        }
 
        /**
index 7651803..853253a 100644 (file)
@@ -134,13 +134,13 @@ class Container implements \TYPO3\CMS\Core\SingletonInterface {
         */
        protected function getInstanceInternal($className, $givenConstructorArguments = array()) {
                $className = $this->getImplementationClassName($className);
-               if ($className === 'TYPO3\\CMS\\Extbase\\Object\\Container\\Container') {
+               if ($className === \TYPO3\CMS\Extbase\Object\Container\Container::class) {
                        return $this;
                }
-               if ($className === 'TYPO3\\CMS\\Core\\Cache\\CacheManager') {
+               if ($className === \TYPO3\CMS\Core\Cache\CacheManager::class) {
                        return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class);
                }
-               if ($className === 'TYPO3\\CMS\\Core\\Package\\PackageManager') {
+               if ($className === \TYPO3\CMS\Core\Package\PackageManager::class) {
                        return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Package\PackageManager::class);
                }
                $className = \TYPO3\CMS\Core\Core\ClassLoader::getClassNameForAlias($className);
@@ -187,7 +187,7 @@ class Container implements \TYPO3\CMS\Core\SingletonInterface {
                }
                $constructorArguments = $this->getConstructorArguments($className, $classInfo, $givenConstructorArguments);
                array_unshift($constructorArguments, $className);
-               $instance = call_user_func_array(array('TYPO3\\CMS\\Core\\Utility\\GeneralUtility', 'makeInstance'), $constructorArguments);
+               $instance = call_user_func_array(array(\TYPO3\CMS\Core\Utility\GeneralUtility::class, 'makeInstance'), $constructorArguments);
                if ($classIsSingleton) {
                        $this->singletonInstances[$className] = $instance;
                }
index 22c209d..cadce59 100644 (file)
@@ -89,7 +89,7 @@ class ObjectManager implements ObjectManagerInterface {
                array_shift($arguments);
                if ($objectName === 'DateTime') {
                        array_unshift($arguments, $objectName);
-                       $instance = call_user_func_array(array('TYPO3\\CMS\\Core\\Utility\\GeneralUtility', 'makeInstance'), $arguments);
+                       $instance = call_user_func_array(array(\TYPO3\CMS\Core\Utility\GeneralUtility::class, 'makeInstance'), $arguments);
                } else {
                        $instance = $this->objectContainer->getInstance($objectName, $arguments);
                }
index adb965c..235378d 100644 (file)
@@ -111,7 +111,7 @@ class ObjectManagerException implements \TYPO3\CMS\Extbase\Object\ObjectManagerI
                array_shift($arguments);
                if ($objectName === 'DateTime') {
                        array_unshift($arguments, $objectName);
-                       $instance = call_user_func_array(array('TYPO3\\CMS\\Core\\Utility\\GeneralUtility', 'makeInstance'), $arguments);
+                       $instance = call_user_func_array(array(\TYPO3\CMS\Core\Utility\GeneralUtility::class, 'makeInstance'), $arguments);
                } else {
                        $instance = $this->objectContainer->getInstance($objectName, $arguments);
                }
index 76d7d6c..58af226 100644 (file)
@@ -105,7 +105,7 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface {
                        }
                        $classHierarchy = array_merge(array($className), class_parents($className));
                        foreach ($classHierarchy as $currentClassName) {
-                               if (in_array($currentClassName, array('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject'))) {
+                               if (in_array($currentClassName, array(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class, \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class))) {
                                        break;
                                }
                                $currentClassSettings = $frameworkConfiguration['persistence']['classes'][$currentClassName];
index 7acd61a..120df2f 100644 (file)
@@ -155,7 +155,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
        protected function createEmptyObject($className) {
                // Note: The class_implements() function also invokes autoload to assure that the interfaces
                // and the class are loaded. Would end up with __PHP_Incomplete_Class without it.
-               if (!in_array('TYPO3\\CMS\\Extbase\\DomainObject\\DomainObjectInterface', class_implements($className))) {
+               if (!in_array(\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface::class, class_implements($className))) {
                        throw new CannotReconstituteObjectException('Cannot create empty instance of the class "' . $className
                                . '" because it does not implement the TYPO3\\CMS\\Extbase\\DomainObject\\DomainObjectInterface.', 1234386924);
                }
@@ -214,7 +214,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
                                                // $propertyValue = $this->mapArray($row[$columnName]); // Not supported, yet!
                                                break;
                                        case 'SplObjectStorage':
-                                       case 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage':
+                                       case \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class:
                                                $propertyValue = $this->mapResultToPropertyValue(
                                                        $object,
                                                        $propertyName,
@@ -288,7 +288,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
        public function fetchRelated(DomainObjectInterface $parentObject, $propertyName, $fieldValue = '', $enableLazyLoading = TRUE) {
                $propertyMetaData = $this->reflectionService->getClassSchema(get_class($parentObject))->getProperty($propertyName);
                if ($enableLazyLoading === TRUE && $propertyMetaData['lazy']) {
-                       if ($propertyMetaData['type'] === 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage') {
+                       if ($propertyMetaData['type'] === \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class) {
                                $result = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage::class, $parentObject, $propertyName, $fieldValue);
                        } else {
                                if (empty($fieldValue)) {
@@ -475,14 +475,14 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
                        $propertyValue = $result;
                } else {
                        $propertyMetaData = $this->reflectionService->getClassSchema(get_class($parentObject))->getProperty($propertyName);
-                       if (in_array($propertyMetaData['type'], array('array', 'ArrayObject', 'SplObjectStorage', 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage'), TRUE)) {
+                       if (in_array($propertyMetaData['type'], array('array', 'ArrayObject', 'SplObjectStorage', \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class), TRUE)) {
                                $objects = array();
                                foreach ($result as $value) {
                                        $objects[] = $value;
                                }
                                if ($propertyMetaData['type'] === 'ArrayObject') {
                                        $propertyValue = new \ArrayObject($objects);
-                               } elseif (in_array($propertyMetaData['type'], array('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage'), TRUE)) {
+                               } elseif (in_array($propertyMetaData['type'], array(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class), TRUE)) {
                                        $propertyValue = new Persistence\ObjectStorage();
                                        foreach ($objects as $object) {
                                                $propertyValue->attach($object);
index f5200a3..f179470 100644 (file)
@@ -31,11 +31,11 @@ class PropertyMappingConfigurationBuilder implements \TYPO3\CMS\Core\SingletonIn
         * @param string $type the implementation class name of the PropertyMappingConfiguration to instanciate; must be a subclass of \TYPO3\CMS\Extbase\Property\PropertyMappingConfiguration
         * @return \TYPO3\CMS\Extbase\Property\PropertyMappingConfiguration
         */
-       public function build($type = 'TYPO3\\CMS\\Extbase\\Property\\PropertyMappingConfiguration') {
+       public function build($type = \TYPO3\CMS\Extbase\Property\PropertyMappingConfiguration::class) {
                /** @var $configuration \TYPO3\CMS\Extbase\Property\PropertyMappingConfiguration */
                $configuration = new $type();
 
-               $configuration->setTypeConverterOptions('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\PersistentObjectConverter', array(
+               $configuration->setTypeConverterOptions(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, array(
                        \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => TRUE,
                        \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED => TRUE
                ));
index 289507c..c6f7f58 100644 (file)
@@ -39,7 +39,7 @@ class CoreTypeConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\Abstra
        /**
         * @var string
         */
-       protected $targetType = 'TYPO3\\CMS\\Core\\Type\\TypeInterface';
+       protected $targetType = \TYPO3\CMS\Core\Type\TypeInterface::class;
 
        /**
         * @var int
index c2a76ce..48e87ad 100644 (file)
@@ -31,7 +31,7 @@ namespace TYPO3\CMS\Extbase\Property\TypeConverter;
  *  $this->arguments['<argumentName>']
  *    ->getPropertyMappingConfiguration()
  *    ->forProperty('<propertyName>') // this line can be skipped in order to specify the format for all properties
- *    ->setTypeConverterOption('TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, '<dateFormat>');
+ *    ->setTypeConverterOption(\TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, '<dateFormat>');
  *
  * If the source is of type array, it is possible to override the format in the source::
  *
@@ -192,7 +192,7 @@ class DateTimeConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\Abstra
                if ($configuration === NULL) {
                        return self::DEFAULT_DATE_FORMAT;
                }
-               $dateFormat = $configuration->getConfigurationValue('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\DateTimeConverter', self::CONFIGURATION_DATE_FORMAT);
+               $dateFormat = $configuration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter::class, self::CONFIGURATION_DATE_FORMAT);
                if ($dateFormat === NULL) {
                        return self::DEFAULT_DATE_FORMAT;
                } elseif ($dateFormat !== NULL && !is_string($dateFormat)) {
index dd3c7ed..608be4c 100644 (file)
@@ -28,12 +28,12 @@ class FileConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\AbstractFi
        /**
         * @var string
         */
-       protected $targetType = 'TYPO3\\CMS\\Extbase\\Domain\\Model\\File';
+       protected $targetType = \TYPO3\CMS\Extbase\Domain\Model\File::class;
 
        /**
         * @var string
         */
-       protected $expectedObjectType = 'TYPO3\\CMS\\Core\\Resource\\File';
+       protected $expectedObjectType = \TYPO3\CMS\Core\Resource\File::class;
 
        /**
         * @param string|int $source
index 5404041..bea5f18 100644 (file)
@@ -28,12 +28,12 @@ class FileReferenceConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\A
        /**
         * @var string
         */
-       protected $targetType = 'TYPO3\\CMS\\Extbase\\Domain\\Model\\FileReference';
+       protected $targetType = \TYPO3\CMS\Extbase\Domain\Model\FileReference::class;
 
        /**
         * @var string
         */
-       protected $expectedObjectType = 'TYPO3\\CMS\\Core\\Resource\\FileReference';
+       protected $expectedObjectType = \TYPO3\CMS\Core\Resource\FileReference::class;
 
        /**
         * @param int $source
index 08548b3..9af864a 100644 (file)
@@ -28,12 +28,12 @@ class FolderBasedFileCollectionConverter extends \TYPO3\CMS\Extbase\Property\Typ
        /**
         * @var string
         */
-       protected $targetType = 'TYPO3\\CMS\\Extbase\\Domain\\Model\\FolderBasedFileCollection';
+       protected $targetType = \TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection::class;
 
        /**
         * @var string
         */
-       protected $expectedObjectType = 'TYPO3\\CMS\\Core\\Resource\\Collection\\FolderBasedFileCollection';
+       protected $expectedObjectType = \TYPO3\CMS\Core\Resource\Collection\FolderBasedFileCollection::class;
 
        /**
         * @param int $source
index 21f467d..bd2a624 100644 (file)
@@ -28,12 +28,12 @@ class FolderConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\Abstract
        /**
         * @var string
         */
-       protected $targetType = 'TYPO3\\CMS\\Extbase\\Domain\\Model\\Folder';
+       protected $targetType = \TYPO3\CMS\Extbase\Domain\Model\Folder::class;
 
        /**
         * @var string
         */
-       protected $expectedObjectType = 'TYPO3\\CMS\\Core\\Resource\\Folder';
+       protected $expectedObjectType = \TYPO3\CMS\Core\Resource\Folder::class;
 
        /**
         * @param string $source
index 94d7dfb..d950ced 100644 (file)
@@ -78,7 +78,7 @@ class ObjectConverter extends AbstractTypeConverter implements \TYPO3\CMS\Core\S
         * @return bool
         */
        public function canConvertFrom($source, $targetType) {
-               return !is_subclass_of($targetType, 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractDomainObject');
+               return !is_subclass_of($targetType, \TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::class);
        }
 
        /**
@@ -104,7 +104,7 @@ class ObjectConverter extends AbstractTypeConverter implements \TYPO3\CMS\Core\S
         * @throws \TYPO3\CMS\Extbase\Property\Exception\InvalidTargetException
         */
        public function getTypeOfChildProperty($targetType, $propertyName, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration) {
-               $configuredTargetType = $configuration->getConfigurationFor($propertyName)->getConfigurationValue('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\ObjectConverter', self::CONFIGURATION_TARGET_TYPE);
+               $configuredTargetType = $configuration->getConfigurationFor($propertyName)->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\ObjectConverter::class, self::CONFIGURATION_TARGET_TYPE);
                if ($configuredTargetType !== NULL) {
                        return $configuredTargetType;
                }
@@ -178,7 +178,7 @@ class ObjectConverter extends AbstractTypeConverter implements \TYPO3\CMS\Core\S
                        if ($configuration === NULL) {
                                throw new \InvalidArgumentException('A property mapping configuration must be given, not NULL.', 1326277369);
                        }
-                       if ($configuration->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\ObjectConverter', self::CONFIGURATION_OVERRIDE_TARGET_TYPE_ALLOWED) !== TRUE) {
+                       if ($configuration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\ObjectConverter::class, self::CONFIGURATION_OVERRIDE_TARGET_TYPE_ALLOWED) !== TRUE) {
                                throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyMappingConfigurationException('Override of target type not allowed. To enable this, you need to set the PropertyMappingConfiguration Value "CONFIGURATION_OVERRIDE_TARGET_TYPE_ALLOWED" to TRUE.', 1317050430);
                        }
 
index 3f2fa4c..532a750 100644 (file)
@@ -37,7 +37,7 @@ class ObjectStorageConverter extends AbstractTypeConverter {
        /**
         * @var string
         */
-       protected $targetType = 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage';
+       protected $targetType = \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class;
 
        /**
         * @var int
index 18b4f53..708e232 100644 (file)
@@ -75,7 +75,7 @@ class PersistentObjectConverter extends ObjectConverter {
         * @return bool
         */
        public function canConvertFrom($source, $targetType) {
-               return is_subclass_of($targetType, 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractDomainObject');
+               return is_subclass_of($targetType, \TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::class);
        }
 
        /**
@@ -104,7 +104,7 @@ class PersistentObjectConverter extends ObjectConverter {
         * @throws \TYPO3\CMS\Extbase\Property\Exception\InvalidTargetException
         */
        public function getTypeOfChildProperty($targetType, $propertyName, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration) {
-               $configuredTargetType = $configuration->getConfigurationFor($propertyName)->getConfigurationValue('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\PersistentObjectConverter', self::CONFIGURATION_TARGET_TYPE);
+               $configuredTargetType = $configuration->getConfigurationFor($propertyName)->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, self::CONFIGURATION_TARGET_TYPE);
                if ($configuredTargetType !== NULL) {
                        return $configuredTargetType;
                }
@@ -133,7 +133,7 @@ class PersistentObjectConverter extends ObjectConverter {
                if (is_array($source)) {
                        if (
                                class_exists($targetType)
-                               && is_subclass_of($targetType, 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject')
+                               && is_subclass_of($targetType, \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class)
                        ) {
                                // Unset identity for valueobject to use constructor mapping, since the identity is determined from
                                // constructor arguments
@@ -178,11 +178,11 @@ class PersistentObjectConverter extends ObjectConverter {
                if (isset($source['__identity'])) {
                        $object = $this->fetchObjectFromPersistence($source['__identity'], $targetType);
 
-                       if (count($source) > 1 && ($configuration === NULL || $configuration->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', self::CONFIGURATION_MODIFICATION_ALLOWED) !== TRUE)) {
+                       if (count($source) > 1 && ($configuration === NULL || $configuration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, self::CONFIGURATION_MODIFICATION_ALLOWED) !== TRUE)) {
                                throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyMappingConfigurationException('Modification of persistent objects not allowed. To enable this, you need to set the PropertyMappingConfiguration Value "CONFIGURATION_MODIFICATION_ALLOWED" to TRUE.', 1297932028);
                        }
                } else {
-                       if ($configuration === NULL || $configuration->getConfigurationValue('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\PersistentObjectConverter', self::CONFIGURATION_CREATION_ALLOWED) !== TRUE) {
+                       if ($configuration === NULL || $configuration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, self::CONFIGURATION_CREATION_ALLOWED) !== TRUE) {
                                throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyMappingConfigurationException('Creation of objects not allowed. To enable this, you need to set the PropertyMappingConfiguration Value "CONFIGURATION_CREATION_ALLOWED" to TRUE');
                        }
                        $object = $this->buildObject($convertedChildProperties, $targetType);
index fa49272..b639c8f 100644 (file)
@@ -28,12 +28,12 @@ class StaticFileCollectionConverter extends \TYPO3\CMS\Extbase\Property\TypeConv
        /**
         * @var string
         */
-       protected $targetType = 'TYPO3\\CMS\\Extbase\\Domain\\Model\\StaticFileCollection';
+       protected $targetType = \TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection::class;
 
        /**
         * @var string
         */
-       protected $expectedObjectType = 'TYPO3\\CMS\\Core\\Resource\\Collection\\StaticFileCollection';
+       protected $expectedObjectType = \TYPO3\CMS\Core\Resource\Collection\StaticFileCollection::class;
 
        /**
         * @param int $source
index 8737f39..f7a2d86 100644 (file)
@@ -450,13 +450,13 @@ class ReflectionService implements \TYPO3\CMS\Core\SingletonInterface {
                        throw new Exception\UnknownClassException('The classname "' . $className . '" was not found and thus can not be reflected.', 1278450972);
                }
                $classSchema = $this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\ClassSchema::class, $className);
-               if (is_subclass_of($className, 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity')) {
+               if (is_subclass_of($className, \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class)) {
                        $classSchema->setModelType(ClassSchema::MODELTYPE_ENTITY);
                        $possibleRepositoryClassName = ClassNamingUtility::translateModelNameToRepositoryName($className);
                        if (class_exists($possibleRepositoryClassName)) {
                                $classSchema->setAggregateRoot(TRUE);
                        }
-               } elseif (is_subclass_of($className, 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject')) {
+               } elseif (is_subclass_of($className, \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class)) {
                        $classSchema->setModelType(ClassSchema::MODELTYPE_VALUEOBJECT);
                }
                foreach ($this->getClassPropertyNames($className) as $propertyName) {
index c7d4c1c..5cfd7ba 100644 (file)
@@ -47,13 +47,13 @@ class DebuggerUtility {
         */
        static protected $blacklistedClassNames = array(
                'PHPUnit_Framework_MockObject_InvocationMocker',
-               'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\IdentityMap',
-               'TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService',
-               'TYPO3\\CMS\\Extbase\\Object\\ObjectManager',
-               'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper',
-               'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager',
-               'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\QueryObjectModelFactory',
-               'TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'
+               \TYPO3\CMS\Extbase\Persistence\Generic\IdentityMap::class,
+               \TYPO3\CMS\Extbase\Reflection\ReflectionService::class,
+               \TYPO3\CMS\Extbase\Object\ObjectManager::class,
+               \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class,
+               \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class,
+               \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory::class,
+               \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class
        );
 
        /**
index ed5daa3..9b98c0e 100644 (file)
@@ -226,7 +226,7 @@ tt_content.' . $pluginSignature . ' {
                        $moduleConfiguration['vendorName'] = $vendorName;
                }
                $moduleConfiguration['extensionName'] = $extensionName;
-               $moduleConfiguration['configureModuleFunction'] = array('TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility', 'configureModule');
+               $moduleConfiguration['configureModuleFunction'] = array(\TYPO3\CMS\Extbase\Utility\ExtensionUtility::class, 'configureModule');
                $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature] = $moduleConfiguration;
                if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature])) {
                        $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature] = array();
index 440ae2e..d4bd88b 100644 (file)
@@ -30,7 +30,7 @@ class TypeHandlingUtility {
        /**
         * @var array
         */
-       static protected $collectionTypes = array('array', 'ArrayObject', 'SplObjectStorage', 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage');
+       static protected $collectionTypes = array('array', 'ArrayObject', 'SplObjectStorage', \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class);
 
        /**
         * Returns an array with type information, including element type for
@@ -110,7 +110,7 @@ class TypeHandlingUtility {
         * @return bool
         */
        static public function isCoreType($type) {
-               return is_subclass_of($type, 'TYPO3\\CMS\\Core\\Type\\TypeInterface');
+               return is_subclass_of($type, \TYPO3\CMS\Core\Type\TypeInterface::class);
        }
 
        /**
index c3de967..779f9c7 100644 (file)
@@ -148,7 +148,7 @@ class ValidatorResolver implements \TYPO3\CMS\Core\SingletonInterface {
 
                foreach ($methodParameters as $parameterName => $methodParameter) {
                        /** @var ConjunctionValidator $validatorConjunction */
-                       $validatorConjunction = $this->createValidator('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ConjunctionValidator');
+                       $validatorConjunction = $this->createValidator(\TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator::class);
 
                        if (!array_key_exists('type', $methodParameter)) {
                                throw new Exception\InvalidTypeHintException('Missing type information, probably no @param annotation for parameter "$' . $parameterName . '" in ' . $className . '->' . $methodName . '()', 1281962564);
@@ -267,7 +267,7 @@ class ValidatorResolver implements \TYPO3\CMS\Core\SingletonInterface {
                                }
                                $propertyTargetClassName = $parsedType['type'];
                                if (\TYPO3\CMS\Extbase\Utility\TypeHandlingUtility::isCollectionType($propertyTargetClassName) === TRUE) {
-                                       $collectionValidator = $this->createValidator('TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator', array('elementType' => $parsedType['elementType'], 'validationGroups' => $validationGroups));
+                                       $collectionValidator = $this->createValidator(\TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator::class, array('elementType' => $parsedType['elementType'], 'validationGroups' => $validationGroups));
                                        $objectValidator->addPropertyValidator($classPropertyName, $collectionValidator);
                                } elseif (class_exists($propertyTargetClassName) && !\TYPO3\CMS\Extbase\Utility\TypeHandlingUtility::isCoreType($propertyTargetClassName) && $this->objectManager->isRegistered($propertyTargetClassName) && $this->objectManager->getScope($propertyTargetClassName) === \TYPO3\CMS\Extbase\Object\Container\Container::SCOPE_PROTOTYPE) {
                                        $validatorForProperty = $this->getBaseValidatorConjunction($propertyTargetClassName, $validationGroups);
@@ -453,7 +453,7 @@ class ValidatorResolver implements \TYPO3\CMS\Core\SingletonInterface {
 
                if (class_exists($possibleClassName)) {
                        $possibleClassNameInterfaces = class_implements($possibleClassName);
-                       if (!in_array('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ValidatorInterface', $possibleClassNameInterfaces)) {
+                       if (!in_array(\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface::class, $possibleClassNameInterfaces)) {
                                // The guessed validatorname is a valid class name, but does not implement the ValidatorInterface
                                throw new NoSuchValidatorException('Validator class ' . $validatorName . ' must implement \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface', 1365776838);
                        }
index ab9aee2..d09504f 100644 (file)
@@ -70,15 +70,15 @@ class TranslationTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
         * Minimal frontent environment to satisfy Extbase Typo3DbBackend
         */
        protected function setUpBasicFrontendEnvironment() {
-               $environmentServiceMock = $this->getMock('TYPO3\\CMS\\Extbase\\Service\\EnvironmentService');
+               $environmentServiceMock = $this->getMock(\TYPO3\CMS\Extbase\Service\EnvironmentService::class);
                $environmentServiceMock
                        ->expects($this->any())
                        ->method('isEnvironmentInFrontendMode')
                        ->willReturn(TRUE);
-               GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Extbase\\Service\\EnvironmentService', $environmentServiceMock);
+               GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Service\EnvironmentService::class, $environmentServiceMock);
 
                $pageRepositoryFixture = new PageRepository();
-               $frontendControllerMock = $this->getMock('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', array(), array(), '', FALSE);
+               $frontendControllerMock = $this->getMock(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, array(), array(), '', FALSE);
                $frontendControllerMock->sys_page = $pageRepositoryFixture;
                $GLOBALS['TSFE'] = $frontendControllerMock;
        }
index fa30907..834ab0f 100644 (file)
@@ -111,8 +111,8 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         * Sets up this testcase
         */
        public function setUp() {
-               $this->abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\AbstractConfigurationManager', array('getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
-               $this->mockTypoScriptService = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
+               $this->abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, array('getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
+               $this->mockTypoScriptService = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Service\TypoScriptService::class);
                $this->abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
        }
 
@@ -337,7 +337,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         */
        public function switchableControllerActionsAreNotOverriddenIfPluginNameIsSpecified() {
                /** @var \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\AbstractConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
                $abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
                $abstractConfigurationManager->setConfiguration(array('switchableControllerActions' => array('overriddenSwitchableControllerActions')));
                $abstractConfigurationManager->expects($this->any())->method('getPluginConfiguration')->will($this->returnValue(array()));
@@ -351,7 +351,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
        public function switchableControllerActionsAreOverriddenIfSpecifiedPluginIsTheCurrentPlugin() {
                /** @var \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
                $configuration = array('extensionName' => 'CurrentExtensionName', 'pluginName' => 'CurrentPluginName', 'switchableControllerActions' => array('overriddenSwitchableControllerActions'));
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\AbstractConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
                $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
                $abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
                $abstractConfigurationManager->setConfiguration($configuration);
@@ -366,7 +366,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
        public function switchableControllerActionsAreOverriddenIfPluginNameIsNotSpecified() {
                /** @var \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
                $configuration = array('switchableControllerActions' => array('overriddenSwitchableControllerActions'));
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\AbstractConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions', 'getRecursiveStoragePids'));
                $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
                $abstractConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
                $abstractConfigurationManager->setConfiguration($configuration);
@@ -491,7 +491,7 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         * @test
         */
        public function getContentObjectTheCurrentContentObject() {
-               $mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+               $mockContentObject = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                $this->abstractConfigurationManager->setContentObject($mockContentObject);
                $this->assertSame($this->abstractConfigurationManager->getContentObject(), $mockContentObject);
        }
index 148204c..e8155a6 100644 (file)
@@ -33,9 +33,9 @@ class BackendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * Sets up this testcase
         */
        public function setUp() {
-               $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array());
-               $this->backendConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager', array('getTypoScriptSetup'));
-               $this->mockTypoScriptService = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
+               $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array());
+               $this->backendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager::class, array('getTypoScriptSetup'));
+               $this->mockTypoScriptService = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Service\TypoScriptService::class);
                $this->backendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
        }
 
@@ -275,7 +275,7 @@ class BackendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                        ),
                        'mvc' => array(
                                'requestHandlers' => array(
-                                       'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'SomeRequestHandler'
+                                       \TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::class => 'SomeRequestHandler'
                                )
                        )
                );
@@ -307,8 +307,8 @@ class BackendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                        ),
                        'mvc' => array(
                                'requestHandlers' => array(
-                                       'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler',
-                                       'TYPO3\\CMS\\Extbase\\Mvc\\Web\\BackendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\BackendRequestHandler'
+                                       \TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::class => \TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::class,
+                                       \TYPO3\CMS\Extbase\Mvc\Web\BackendRequestHandler::class => \TYPO3\CMS\Extbase\Mvc\Web\BackendRequestHandler::class
                                )
                        )
                );
@@ -323,8 +323,8 @@ class BackendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                $storagePid = '1,2,3';
                $recursive = 99;
                /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager */
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\CMS\\Extbase\\Configuration\\BackendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
-               $queryGenerator = $this->getMock('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $queryGenerator = $this->getMock(\TYPO3\CMS\Core\Database\QueryGenerator::class);
                $queryGenerator->expects($this->any())
                        ->method('getTreeList')
                        ->will($this->onConsecutiveCalls('4', '', '5,6'));
@@ -342,8 +342,8 @@ class BackendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                $storagePid = '1,2,-3';
                $recursive = 99;
                /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager */
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\CMS\\Extbase\\Configuration\\BackendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
-               $queryGenerator = $this->getMock('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $queryGenerator = $this->getMock(\TYPO3\CMS\Core\Database\QueryGenerator::class);
                $queryGenerator->expects($this->any())
                        ->method('getTreeList')
                        ->will($this->onConsecutiveCalls('4', '', '3,5,6'));
@@ -360,9 +360,9 @@ class BackendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
        public function storagePidsAreNotExtendedIfRecursiveSearchIsNotConfigured() {
                $storagePid = '1,2,3';
 
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
 
-               $queryGenerator = $this->getMock('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
+               $queryGenerator = $this->getMock(\TYPO3\CMS\Core\Database\QueryGenerator::class);
                $queryGenerator->expects($this->never())->method('getTreeList');
                $abstractConfigurationManager->_set('queryGenerator', $queryGenerator);
 
@@ -378,9 +378,9 @@ class BackendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                $storagePid = '1,2,3';
                $recursive = 0;
 
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
 
-               $queryGenerator = $this->getMock('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
+               $queryGenerator = $this->getMock(\TYPO3\CMS\Core\Database\QueryGenerator::class);
                $queryGenerator->expects($this->never())->method('getTreeList');
                $abstractConfigurationManager->_set('queryGenerator', $queryGenerator);
 
index 3a4302f..eccfb32 100644 (file)
@@ -40,10 +40,10 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
        public function setUp() {
                $GLOBALS['TSFE'] = new \stdClass();
                $GLOBALS['TSFE']->tmpl = new \stdClass();
-               $this->mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array('getTreeList'));
-               $this->frontendConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('dummy'));
+               $this->mockContentObject = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, array('getTreeList'));
+               $this->frontendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, array('dummy'));
                $this->frontendConfigurationManager->_set('contentObject', $this->mockContentObject);
-               $this->mockTypoScriptService = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
+               $this->mockTypoScriptService = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Service\TypoScriptService::class);
                $this->frontendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
        }
 
@@ -315,7 +315,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
                        )
                );
                /** @var \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $frontendConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('overrideStoragePidIfStartingPointIsSet', 'overrideConfigurationFromPlugin', 'overrideConfigurationFromFlexForm'));
+               $frontendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, array('overrideStoragePidIfStartingPointIsSet', 'overrideConfigurationFromPlugin', 'overrideConfigurationFromFlexForm'));
                $frontendConfigurationManager->expects($this->at(0))->method('overrideStoragePidIfStartingPointIsSet')->with($frameworkConfiguration)->will($this->returnValue(array('overridden' => 'storagePid')));
                $frontendConfigurationManager->expects($this->at(1))->method('overrideConfigurationFromPlugin')->with(array('overridden' => 'storagePid'))->will($this->returnValue(array('overridden' => 'pluginConfiguration')));
                $frontendConfigurationManager->expects($this->at(2))->method('overrideConfigurationFromFlexForm')->with(array('overridden' => 'pluginConfiguration'))->will($this->returnValue(array('overridden' => 'flexFormConfiguration')));
@@ -331,9 +331,9 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
                $storagePid = '3,5,9';
                $recursive = 99;
                /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
                /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-               $cObjectMock = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+               $cObjectMock = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                $cObjectMock->expects($this->any())
                        ->method('getTreeList')
                        ->will($this->onConsecutiveCalls('4', '', '898,12'));
@@ -351,9 +351,9 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
                $storagePid = '-3,5,9';
                $recursive = 99;
                /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
                /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-               $cObjectMock = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+               $cObjectMock = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                $cObjectMock->expects($this->any())
                        ->method('getTreeList')
                        ->will($this->onConsecutiveCalls('3,4', '', '898,12'));
@@ -371,9 +371,9 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
                $storagePid = '1,2,3';
 
                /** @var $abstractConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
                /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-               $cObjectMock = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+               $cObjectMock = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                $cObjectMock->expects($this->never())->method('getTreeList');
                $abstractConfigurationManager->setContentObject($cObjectMock);
 
@@ -389,10 +389,10 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
                $storagePid = '1,2,3';
                $recursive = 0;
 
-               $abstractConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
+               $abstractConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, array('overrideSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration', 'getSwitchableControllerActions'));
 
                /** @var $cObjectMock \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-               $cObjectMock = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+               $cObjectMock = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                $cObjectMock->expects($this->never())->method('getTreeList');
                $abstractConfigurationManager->setContentObject($cObjectMock);
 
@@ -439,7 +439,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         */
        public function overrideConfigurationFromFlexFormChecksForDataIsString() {
                /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-               $flexFormService = $this->getMock('TYPO3\CMS\Extbase\Service\FlexFormService', array('convertFlexFormContentToArray'));
+               $flexFormService = $this->getMock(\TYPO3\CMS\Extbase\Service\FlexFormService::class, array('convertFlexFormContentToArray'));
                $flexFormService->expects($this->once())->method('convertFlexFormContentToArray')->will($this->returnValue(array(
                        'persistence' => array(
                                'storagePid' => '0,1,2,3'
@@ -461,7 +461,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         */
        public function overrideConfigurationFromFlexFormChecksForDataIsStringAndEmpty() {
                /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-               $flexFormService = $this->getMock('TYPO3\CMS\Extbase\Service\FlexFormService', array('convertFlexFormContentToArray'));
+               $flexFormService = $this->getMock(\TYPO3\CMS\Extbase\Service\FlexFormService::class, array('convertFlexFormContentToArray'));
                $flexFormService->expects($this->never())->method('convertFlexFormContentToArray');
 
                $this->frontendConfigurationManager->_set('flexFormService', $flexFormService);
@@ -479,7 +479,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         */
        public function overrideConfigurationFromFlexFormChecksForDataIsArray() {
                /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-               $flexFormService = $this->getMock('TYPO3\CMS\Extbase\Service\FlexFormService', array('convertFlexFormContentToArray'));
+               $flexFormService = $this->getMock(\TYPO3\CMS\Extbase\Service\FlexFormService::class, array('convertFlexFormContentToArray'));
                $flexFormService->expects($this->never())->method('convertFlexFormContentToArray');
 
                $this->frontendConfigurationManager->_set('flexFormService', $flexFormService);
@@ -497,7 +497,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         */
        public function overrideConfigurationFromFlexFormChecksForDataIsArrayAndEmpty() {
                /** @var $flexFormService \TYPO3\CMS\Extbase\Service\FlexFormService|\PHPUnit_Framework_MockObject_MockObject */
-               $flexFormService = $this->getMock('TYPO3\CMS\Extbase\Service\FlexFormService', array('convertFlexFormContentToArray'));
+               $flexFormService = $this->getMock(\TYPO3\CMS\Extbase\Service\FlexFormService::class, array('convertFlexFormContentToArray'));
                $flexFormService->expects($this->never())->method('convertFlexFormContentToArray');
 
                $this->frontendConfigurationManager->_set('flexFormService', $flexFormService);
@@ -516,7 +516,7 @@ class FrontendConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         */
        public function overrideConfigurationFromPluginOverridesCorrectly() {
                /** @var $frontendConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
-               $frontendConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('getTypoScriptSetup'));
+               $frontendConfigurationManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class, array('getTypoScriptSetup'));
                $frontendConfigurationManager->_set('contentObject', $this->mockContentObject);
                $frontendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
 
index f4f6acc..785d9d3 100644 (file)
@@ -42,9 +42,9 @@ class BootstrapTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function configureObjectManagerRespectsOverridingOfAlternativeObjectRegistrationViaPluginConfiguration() {
                /** @var $objectContainer \TYPO3\CMS\Extbase\Object\Container\Container|\PHPUnit_Framework_MockObject_MockObject */
-               $objectContainer = $this->getMock('TYPO3\CMS\Extbase\Object\Container\Container', array('registerImplementation'));
-               $objectContainer->expects($this->once())->method('registerImplementation')->with('TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface', 'TYPO3\CMS\Extbase\Persistence\Reddis\PersistenceManager');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\CMS\Extbase\Object\Container\Container', $objectContainer);
+               $objectContainer = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\Container::class, array('registerImplementation'));
+               $objectContainer->expects($this->once())->method('registerImplementation')->with(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class, 'TYPO3\CMS\Extbase\Persistence\Reddis\PersistenceManager');
+               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class, $objectContainer);
 
                $frameworkSettings['objects'] = array(
                        'TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface.' => array(
@@ -53,14 +53,14 @@ class BootstrapTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
 
                /** @var $configurationManagerMock \TYPO3\CMS\Extbase\Configuration\ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject */
-               $configurationManagerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager', array('getConfiguration'));
+               $configurationManagerMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class, array('getConfiguration'));
                $configurationManagerMock->expects($this->any())->method('getConfiguration')->with('Framework')->will($this->returnValue($frameworkSettings));
 
                /** @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject  $objectManager */
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
 
                /** @var $bootstrapMock \TYPO3\CMS\Extbase\Core\Bootstrap|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject */
-               $bootstrapMock = $this->getAccessibleMock('TYPO3\CMS\Extbase\Core\Bootstrap', array('inject'));
+               $bootstrapMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Core\Bootstrap::class, array('inject'));
                $bootstrapMock->_set('objectManager', $objectManager);
                $bootstrapMock->_set('configurationManager', $configurationManagerMock);
                $bootstrapMock->configureObjectManager();
index db7570d..8647e95 100644 (file)
@@ -23,11 +23,11 @@ class BackendUserGroupRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function initializeObjectSetsRespectStoragePidToFalse() {
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository($objectManager);
-               $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 
@@ -35,11 +35,11 @@ class BackendUserGroupRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @test
         */
        public function initializeObjectSetsDefaultQuerySettings() {
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                /** @var $fixture \TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository */
-               $fixture = $this->getMock('TYPO3\\CMS\\Extbase\\Domain\\Repository\\BackendUserGroupRepository', array('setDefaultQuerySettings'), array($objectManager));
-               $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
-               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $fixture = $this->getMock(\TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository::class, array('setDefaultQuerySettings'), array($objectManager));
+               $querySettings = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
+               $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
                $fixture->expects($this->once())->method('setDefaultQuerySettings')->with($querySettings);
                $fixture->initializeObject();
        }
index b82b314..5b891aa 100644 (file)
@@ -23,11 +23,11 @@ class BackendUserRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function initializeObjectSetsRespectStoragePidToFalse() {
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository($objectManager);
-               $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 
@@ -35,11 +35,11 @@ class BackendUserRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function initializeObjectSetsDefaultQuerySettings() {
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                /** @var $fixture \TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository */
-               $fixture = $this->getMock('TYPO3\\CMS\\Extbase\\Domain\\Repository\\BackendUserGroupRepository', array('setDefaultQuerySettings'), array($objectManager));
-               $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
-               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $fixture = $this->getMock(\TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository::class, array('setDefaultQuerySettings'), array($objectManager));
+               $querySettings = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
+               $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
                $fixture->expects($this->once())->method('setDefaultQuerySettings')->with($querySettings);
                $fixture->initializeObject();
        }
index 9b9dfc7..3571e39 100644 (file)
@@ -25,7 +25,7 @@ class CategoryRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $fixture = NULL;
 
        protected function setUp() {
-               $this->fixture = new \TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository($this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface'));
+               $this->fixture = new \TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository($this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class));
        }
 
        /**
@@ -33,11 +33,11 @@ class CategoryRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function initializeObjectSetsRespectStoragePidToFalse() {
                /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository($objectManager);
-               $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 }
index f612c16..8486068 100644 (file)
@@ -25,7 +25,7 @@ class FileMountRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $fixture = NULL;
 
        protected function setUp() {
-               $this->fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface'));
+               $this->fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class));
        }
 
        /**
@@ -33,11 +33,11 @@ class FileMountRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function initializeObjectSetsRespectStoragePidToFalse() {
                /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($objectManager);
-               $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 }
index 5e9f949..22a585a 100644 (file)
@@ -25,7 +25,7 @@ class AbstractEntityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function objectIsNotDirtyAfterCallingMemorizeCleanStateWithSimpleProperties() {
                $domainObjectName = uniqid('DomainObject_');
                $domainObjectNameWithNS = __NAMESPACE__ . '\\' . $domainObjectName;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                        public $foo;
                        public $bar;
                }');
@@ -42,7 +42,7 @@ class AbstractEntityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function objectIsDirtyAfterCallingMemorizeCleanStateWithSimplePropertiesAndModifyingThePropertiesAfterwards() {
                $domainObjectName = uniqid('DomainObject_');
                $domainObjectNameWithNS = __NAMESPACE__ . '\\' . $domainObjectName;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                        public $foo;
                        public $bar;
                }');
@@ -60,7 +60,7 @@ class AbstractEntityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function objectIsNotDirtyAfterCallingMemorizeCleanStateWithObjectProperties() {
                $domainObjectName = uniqid('DomainObject_');
                $domainObjectNameWithNS = __NAMESPACE__ . '\\' . $domainObjectName;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                        public $foo;
                        public $bar;
                }');
@@ -77,13 +77,13 @@ class AbstractEntityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function objectIsNotDirtyAfterCallingMemorizeCleanStateWithOtherDomainObjectsAsProperties() {
                $domainObjectName = uniqid('DomainObject_');
                $domainObjectNameWithNS = __NAMESPACE__ . '\\' . $domainObjectName;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                        public $foo;
                        public $bar;
                }');
                $secondDomainObjectName = uniqid('DomainObject_');
                $secondDomainObjectNameWithNS = __NAMESPACE__ . '\\' . $secondDomainObjectName;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $secondDomainObjectName . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $secondDomainObjectName . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                        public $foo;
                        public $bar;
                }');
index 3589ec5..742ac63 100644 (file)
@@ -107,7 +107,7 @@ class ResultTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function forPropertyShouldReturnSubResult() {
                $container2 = $this->result->forProperty('foo.bar');
-               $this->assertInstanceOf('TYPO3\\CMS\\Extbase\\Error\\Result', $container2);
+               $this->assertInstanceOf(\TYPO3\CMS\Extbase\Error\Result::class, $container2);
                $this->assertSame($container2, $this->result->forProperty('foo')->forProperty('bar'));
        }
 
index 97dd0d8..bcfc65c 100644 (file)
@@ -45,11 +45,11 @@ class CheckFlexFormValueTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
 
                /** @var \TYPO3\CMS\Core\DataHandling\DataHandler $dataHandler */
-               $dataHandler = $this->getMock('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+               $dataHandler = $this->getMock(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
 
                $newFlexFormDataArray = array();
                /** @var \TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue $checkFlexFormValue */
-               $checkFlexFormValue = $this->getMock('TYPO3\\CMS\\Extbase\\Hook\\DataHandler\\CheckFlexFormValue', array('dummy'));
+               $checkFlexFormValue = $this->getMock(\TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue::class, array('dummy'));
                $checkFlexFormValue->checkFlexFormValue_beforeMerge($dataHandler, $currentFlexFormDataArray, $newFlexFormDataArray);
 
                $this->assertSame($expectedFlexFormDataArray, $currentFlexFormDataArray);
index bfdbce1..96bfe70 100644 (file)
@@ -37,8 +37,8 @@ class CommandManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $commandManager;
 
        public function setUp() {
-               $this->commandManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\CommandManager', array('getAvailableCommands'));
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->commandManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class, array('getAvailableCommands'));
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $this->commandManager->_set('objectManager', $this->mockObjectManager);
        }
 
@@ -48,18 +48,18 @@ class CommandManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getAvailableCommandsReturnsAllAvailableCommands() {
                /** @var \TYPO3\CMS\Core\Tests\AccessibleObjectInterface $commandManager */
-               $commandManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Cli\CommandManager', array('dummy'));
+               $commandManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class, array('dummy'));
                $commandManager->_set('objectManager', $this->mockObjectManager);
                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'] = array(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Mvc\\Cli\\Fixture\\Command\\MockACommandController',
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Mvc\\Cli\\Fixture\\Command\\MockBCommandController'
+                       \TYPO3\CMS\Extbase\Tests\Unit\Mvc\Cli\Fixture\Command\MockACommandController::class,
+                       \TYPO3\CMS\Extbase\Tests\Unit\Mvc\Cli\Fixture\Command\MockBCommandController::class
                );
-               $mockCommand1 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
-               $mockCommand2 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
-               $mockCommand3 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
-               $this->mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', 'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Mvc\\Cli\\Fixture\\Command\\MockACommandController', 'foo')->will($this->returnValue($mockCommand1));
-               $this->mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', 'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Mvc\\Cli\\Fixture\\Command\\MockACommandController', 'bar')->will($this->returnValue($mockCommand2));
-               $this->mockObjectManager->expects($this->at(2))->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', 'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Mvc\\Cli\\Fixture\\Command\\MockBCommandController', 'baz')->will($this->returnValue($mockCommand3));
+               $mockCommand1 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
+               $mockCommand2 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
+               $mockCommand3 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
+               $this->mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, \TYPO3\CMS\Extbase\Tests\Unit\Mvc\Cli\Fixture\Command\MockACommandController::class, 'foo')->will($this->returnValue($mockCommand1));
+               $this->mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, \TYPO3\CMS\Extbase\Tests\Unit\Mvc\Cli\Fixture\Command\MockACommandController::class, 'bar')->will($this->returnValue($mockCommand2));
+               $this->mockObjectManager->expects($this->at(2))->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, \TYPO3\CMS\Extbase\Tests\Unit\Mvc\Cli\Fixture\Command\MockBCommandController::class, 'baz')->will($this->returnValue($mockCommand3));
                $commands = $commandManager->getAvailableCommands();
                $this->assertEquals(3, count($commands));
                $this->assertSame($mockCommand1, $commands[0]);
@@ -72,7 +72,7 @@ class CommandManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function getCommandByIdentifierReturnsCommandIfIdentifierIsEqual() {
-               $mockCommand = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
+               $mockCommand = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
                $mockCommand->expects($this->once())->method('getCommandIdentifier')->will($this->returnValue('extensionkey:controller:command'));
                $mockCommands = array($mockCommand);
                $this->commandManager->expects($this->once())->method('getAvailableCommands')->will($this->returnValue($mockCommands));
@@ -84,7 +84,7 @@ class CommandManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function getCommandByIdentifierWorksCaseInsensitive() {
-               $mockCommand = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
+               $mockCommand = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
                $mockCommand->expects($this->once())->method('getCommandIdentifier')->will($this->returnValue('extensionkey:controller:command'));
                $mockCommands = array($mockCommand);
                $this->commandManager->expects($this->once())->method('getAvailableCommands')->will($this->returnValue($mockCommands));
@@ -97,7 +97,7 @@ class CommandManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function getCommandByIdentifierThrowsExceptionIfNoMatchingCommandWasFound() {
-               $mockCommand = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
+               $mockCommand = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
                $mockCommand->expects($this->once())->method('getCommandIdentifier')->will($this->returnValue('extensionkey:controller:command'));
                $mockCommands = array($mockCommand);
                $this->commandManager->expects($this->once())->method('getAvailableCommands')->will($this->returnValue($mockCommands));
@@ -110,9 +110,9 @@ class CommandManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function getCommandByIdentifierThrowsExceptionIfMoreThanOneMatchingCommandWasFound() {
-               $mockCommand1 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
+               $mockCommand1 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
                $mockCommand1->expects($this->once())->method('getCommandIdentifier')->will($this->returnValue('extensionkey:controller:command'));
-               $mockCommand2 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
+               $mockCommand2 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
                $mockCommand2->expects($this->once())->method('getCommandIdentifier')->will($this->returnValue('otherextensionkey:controller:command'));
                $mockCommands = array($mockCommand1, $mockCommand2);
                $this->commandManager->expects($this->once())->method('getAvailableCommands')->will($this->returnValue($mockCommands));
index 11bc455..a3746aa 100644 (file)
@@ -45,10 +45,10 @@ class CommandTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
-               $this->command = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array('getCommandMethodReflection'), array(), '', FALSE);
-               $this->mockMethodReflection = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\MethodReflection', array(), array(), '', FALSE);
+               $this->command = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array('getCommandMethodReflection'), array(), '', FALSE);
+               $this->mockMethodReflection = $this->getMock(\TYPO3\CMS\Extbase\Reflection\MethodReflection::class, array(), array(), '', FALSE);
                $this->command->expects($this->any())->method('getCommandMethodReflection')->will($this->returnValue($this->mockMethodReflection));
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $this->command->_set('objectManager', $this->mockObjectManager);
        }
 
@@ -113,7 +113,7 @@ class CommandTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function hasArgumentsReturnsTrueIfCommandExpectsArguments() {
-               $mockParameterReflection = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ParameterReflection', array(), array(), '', FALSE);
+               $mockParameterReflection = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ParameterReflection::class, array(), array(), '', FALSE);
                $this->mockMethodReflection->expects($this->atLeastOnce())->method('getParameters')->will($this->returnValue(array($mockParameterReflection)));
                $this->assertTrue($this->command->hasArguments());
        }
@@ -132,17 +132,17 @@ class CommandTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function getArgumentDefinitionsReturnsArrayOfArgumentDefinitionIfCommandExpectsArguments() {
-               $mockParameterReflection = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ParameterReflection', array(), array(), '', FALSE);
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService');
+               $mockParameterReflection = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ParameterReflection::class, array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
                $mockMethodParameters = array('argument1' => array('optional' => FALSE), 'argument2' => array('optional' => TRUE));
                $mockReflectionService->expects($this->atLeastOnce())->method('getMethodParameters')->will($this->returnValue($mockMethodParameters));
                $this->command->_set('reflectionService', $mockReflectionService);
                $this->mockMethodReflection->expects($this->atLeastOnce())->method('getParameters')->will($this->returnValue(array($mockParameterReflection)));
                $this->mockMethodReflection->expects($this->atLeastOnce())->method('getTagsValues')->will($this->returnValue(array('param' => array('@param $argument1 argument1 description', '@param $argument2 argument2 description'))));
-               $mockCommandArgumentDefinition1 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\CommandArgumentDefinition', array(), array(), '', FALSE);
-               $mockCommandArgumentDefinition2 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\CommandArgumentDefinition', array(), array(), '', FALSE);
-               $this->mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\CommandArgumentDefinition', 'argument1', TRUE, 'argument1 description')->will($this->returnValue($mockCommandArgumentDefinition1));
-               $this->mockObjectManager->expects($this->at(1))->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\CommandArgumentDefinition', 'argument2', FALSE, 'argument2 description')->will($this->returnValue($mockCommandArgumentDefinition2));
+               $mockCommandArgumentDefinition1 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition::class, array(), array(), '', FALSE);
+               $mockCommandArgumentDefinition2 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition::class, array(), array(), '', FALSE);
+               $this->mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition::class, 'argument1', TRUE, 'argument1 description')->will($this->returnValue($mockCommandArgumentDefinition1));
+               $this->mockObjectManager->expects($this->at(1))->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition::class, 'argument2', FALSE, 'argument2 description')->will($this->returnValue($mockCommandArgumentDefinition2));
                $expectedResult = array($mockCommandArgumentDefinition1, $mockCommandArgumentDefinition2);
                $actualResult = $this->command->getArgumentDefinitions();
                $this->assertSame($expectedResult, $actualResult);
index 9c1d03e..7f1d755 100644 (file)
@@ -67,17 +67,17 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Robert Lemke <robert@typo3.org>
         */
        public function setUp() {
-               $this->request = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Request', array('dummy'));
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $this->mockObjectManager->expects($this->any())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Request')->will($this->returnValue($this->request));
-               $this->mockCommand = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', array(), array(), '', FALSE);
+               $this->request = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class, array('dummy'));
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $this->mockObjectManager->expects($this->any())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class)->will($this->returnValue($this->request));
+               $this->mockCommand = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, array(), array(), '', FALSE);
                $this->mockCommand->expects($this->any())->method('getControllerClassName')->will($this->returnValue('Tx_SomeExtensionName_Command_DefaultCommandController'));
                $this->mockCommand->expects($this->any())->method('getControllerCommandName')->will($this->returnValue('list'));
-               $this->mockCommandManager = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\CommandManager');
+               $this->mockCommandManager = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class);
                $this->mockCommandManager->expects($this->any())->method('getCommandByIdentifier')->with('some_extension_name:default:list')->will($this->returnValue($this->mockCommand));
-               $this->mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService');
-               $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
-               $this->requestBuilder = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Cli\RequestBuilder', array('dummy'));
+               $this->mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
+               $this->mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
+               $this->requestBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\RequestBuilder::class, array('dummy'));
                $this->requestBuilder->_set('objectManager', $this->mockObjectManager);
                $this->requestBuilder->_set('reflectionService', $this->mockReflectionService);
                $this->requestBuilder->_set('commandManager', $this->mockCommandManager);
@@ -106,11 +106,11 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                // The following call is only made to satisfy PHPUnit. For some weird reason PHPUnit complains that the
                // mocked method ("getObjectNameByClassName") does not exist _if the mock object is not used_.
                $this->mockCommandManager->getCommandByIdentifier('some_extension_name:default:list');
-               $mockCommandManager = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\CommandManager');
+               $mockCommandManager = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class);
                $mockCommandManager->expects($this->any())->method('getCommandByIdentifier')->with('test:default:list')->will($this->throwException(new \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException()));
                $this->requestBuilder->_set('commandManager', $mockCommandManager);
                $request = $this->requestBuilder->build('test:default:list');
-               $this->assertSame('TYPO3\\CMS\\Extbase\\Command\\HelpCommandController', $request->getControllerObjectName());
+               $this->assertSame(\TYPO3\CMS\Extbase\Command\HelpCommandController::class, $request->getControllerObjectName());
        }
 
        /**
index ba5e8cd..b6311f3 100644 (file)
@@ -40,8 +40,8 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Sets up this test case
         */
        public function setUp() {
-               $this->request = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Cli\Request', array('dummy'));
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->request = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class, array('dummy'));
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $this->request->_set('objectManager', $this->mockObjectManager);
        }
 
@@ -52,7 +52,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getCommandReturnsTheCommandObjectReflectingTheRequestInformation() {
                $this->request->setControllerObjectName('Tx_Extbase_Command_CacheCommandController');
                $this->request->setControllerCommandName('flush');
-               $this->mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', 'Tx_Extbase_Command_CacheCommandController', 'flush');
+               $this->mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, 'Tx_Extbase_Command_CacheCommandController', 'flush');
                $this->request->getCommand();
        }
 
@@ -66,7 +66,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->request->getCommand();
                $this->request->setControllerObjectName('Tx_SomeExtension_Command_BeerCommandController');
                $this->request->setControllerCommandName('drink');
-               $this->mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', 'Tx_SomeExtension_Command_BeerCommandController', 'drink');
+               $this->mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class, 'Tx_SomeExtension_Command_BeerCommandController', 'drink');
                $this->request->getCommand();
        }
 
@@ -75,7 +75,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setControllerObjectNameProperlyResolvesExtensionNameWithNamespaces() {
                $mockCliRequest = new \TYPO3\CMS\Extbase\Mvc\Cli\Request;
-               $mockCliRequest->setControllerObjectName('TYPO3\CMS\Extbase\Command\NamespacedMockCommandController');
+               $mockCliRequest->setControllerObjectName(\TYPO3\CMS\Extbase\Command\NamespacedMockCommandController::class);
 
                $this->assertSame('Extbase', $mockCliRequest->getControllerExtensionName());
        }
index 56ac975..88187b1 100644 (file)
@@ -24,7 +24,7 @@ class AbstractControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function constructResolvesExtensionnameFromOldStyle() {
                $className = uniqid('Tx_Extbase_Tests_Fixtures_Controller');
-               eval('class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\Mvc\\Controller\\AbstractController { function getExtensionName() { return $this->extensionName; } }');
+               eval('class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class . ' { function getExtensionName() { return $this->extensionName; } }');
                $mockController = new $className();
                $expectedResult = 'Extbase';
                $actualResult = $mockController->getExtensionName();
@@ -36,7 +36,7 @@ class AbstractControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function constructResolvesExtensionnameFromNamespaced() {
                $className = uniqid('DummyController');
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\Mvc\\Controller\\AbstractController { function getExtensionName() { return $this->extensionName; } }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class . ' { function getExtensionName() { return $this->extensionName; } }');
                $classNameNamespaced = __NAMESPACE__ . '\\' . $className;
                $mockController = new $classNameNamespaced();
                $expectedResult = 'Extbase';
@@ -101,7 +101,7 @@ class AbstractControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function addFlashMessageAddsFlashMessageObjectToFlashMessageQueue($expectedMessage, $messageBody, $messageTitle = '', $severity = \TYPO3\CMS\Core\Messaging\FlashMessage::OK, $storeInSession = TRUE) {
                $flashMessageQueue = $this->getMock(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessageQueue',
+                       \TYPO3\CMS\Core\Messaging\FlashMessageQueue::class,
                        array('enqueue'),
                        array(uniqid('identifier_', TRUE))
                );
@@ -113,7 +113,7 @@ class AbstractControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
                $controllerContext->expects($this->once())->method('getFlashMessageQueue')->will($this->returnValue($flashMessageQueue));
 
-               $controller = $this->getMockForAbstractClass('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\AbstractController',
+               $controller = $this->getMockForAbstractClass(\TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class,
                        array(),
                        '',
                        FALSE,
@@ -131,7 +131,7 @@ class AbstractControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \InvalidArgumentException
         */
        public function addFlashMessageThrowsExceptionOnInvalidMessageBody() {
-               $controller = $this->getMockForAbstractClass('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\AbstractController',
+               $controller = $this->getMockForAbstractClass(\TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class,
                        array(),
                        '',
                        FALSE,
index 8fb26bd..5becd25 100644 (file)
@@ -42,23 +42,23 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $mockMvcPropertyMappingConfigurationService;
 
        public function setUp() {
-               $this->actionController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController');
+               $this->actionController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class);
        }
 
        /**
         * @test
         */
        public function processRequestSticksToSpecifiedSequence() {
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request', array(), array(), '', FALSE);
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class, array(), array(), '', FALSE);
                $mockRequest->expects($this->once())->method('setDispatched')->with(TRUE);
-               $mockUriBuilder = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
+               $mockUriBuilder = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class);
                $mockUriBuilder->expects($this->once())->method('setRequest')->with($mockRequest);
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder')->will($this->returnValue($mockUriBuilder));
-               $mockResponse = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response', array(), array(), '', FALSE);
-               $configurationService = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\MvcPropertyMappingConfigurationService');
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class)->will($this->returnValue($mockUriBuilder));
+               $mockResponse = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Response::class, array(), array(), '', FALSE);
+               $configurationService = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class);
                /** @var \TYPO3\CMS\Extbase\Mvc\Controller\ActionController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array(
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array(
                        'initializeFooAction',
                        'initializeAction',
                        'resolveActionMethodName',
@@ -97,13 +97,13 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function resolveViewUsesFluidTemplateViewIfTemplateIsAvailable() {
                $mockSession = $this->getMock('Tx_Extbase_Session_SessionInterface');
-               $mockControllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE);
-               $mockFluidTemplateView = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
+               $mockControllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', FALSE);
+               $mockFluidTemplateView = $this->getMock(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class);
                $mockFluidTemplateView->expects($this->once())->method('setControllerContext')->with($mockControllerContext);
                $mockFluidTemplateView->expects($this->once())->method('canRender')->with($mockControllerContext)->will($this->returnValue(TRUE));
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface', array(), array(), '', FALSE);
-               $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\View\\TemplateView')->will($this->returnValue($mockFluidTemplateView));
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('buildControllerContext', 'resolveViewObjectName', 'setViewConfiguration'), array(), '', FALSE);
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class, array(), array(), '', FALSE);
+               $mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\View\TemplateView::class)->will($this->returnValue($mockFluidTemplateView));
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('buildControllerContext', 'resolveViewObjectName', 'setViewConfiguration'), array(), '', FALSE);
                $mockController->expects($this->once())->method('resolveViewObjectName')->will($this->returnValue(FALSE));
                $mockController->_set('session', $mockSession);
                $mockController->_set('objectManager', $mockObjectManager);
@@ -116,14 +116,14 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function resolveViewObjectNameUsesViewObjectNamePatternToResolveViewObjectName() {
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array(), array(), '', FALSE);
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array(), array(), '', FALSE);
                $mockRequest->expects($this->once())->method('getControllerVendorName')->will($this->returnValue('MyVendor'));
                $mockRequest->expects($this->once())->method('getControllerExtensionName')->will($this->returnValue('MyPackage'));
                $mockRequest->expects($this->once())->method('getControllerName')->will($this->returnValue('MyController'));
                $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('MyAction'));
                $mockRequest->expects($this->atLeastOnce())->method('getFormat')->will($this->returnValue('MyFormat'));
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface', array(), array(), '', FALSE);
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('dummy'), array(), '', FALSE);
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class, array(), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('dummy'), array(), '', FALSE);
                $mockController->_set('request', $mockRequest);
                $mockController->_set('objectManager', $mockObjectManager);
                $mockController->_set('namespacesViewObjectNamePattern', 'RandomViewObject@vendor\@extension\View\@controller\@action@format');
@@ -136,14 +136,14 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function resolveViewObjectNameUsesNamespacedViewObjectNamePatternForExtensionsWithVendor() {
                eval('namespace MyVendor\MyPackage\View\MyController; class MyActionMyFormat {}');
 
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array(), array(), '', FALSE);
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array(), array(), '', FALSE);
                $mockRequest->expects($this->once())->method('getControllerExtensionName')->will($this->returnValue('MyPackage'));
                $mockRequest->expects($this->once())->method('getControllerName')->will($this->returnValue('MyController'));
                $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('MyAction'));
                $mockRequest->expects($this->once())->method('getControllerVendorName')->will($this->returnValue('MyVendor'));
                $mockRequest->expects($this->atLeastOnce())->method('getFormat')->will($this->returnValue('MyFormat'));
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface', array(), array(), '', FALSE);
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('dummy'), array(), '', FALSE);
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class, array(), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('dummy'), array(), '', FALSE);
                $mockController->_set('request', $mockRequest);
                $mockController->_set('objectManager', $mockObjectManager);
 
@@ -158,10 +158,10 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Robert Lemke <robert@typo3.org>
         */
        public function resolveActionMethodNameReturnsTheCurrentActionMethodNameFromTheRequest() {
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array(), array(), '', FALSE);
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array(), array(), '', FALSE);
                $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('fooBar'));
                /** @var \TYPO3\CMS\Extbase\Mvc\Controller\ActionController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('fooBarAction'), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('fooBarAction'), array(), '', FALSE);
                $mockController->_set('request', $mockRequest);
                $this->assertEquals('fooBarAction', $mockController->_call('resolveActionMethodName'));
        }
@@ -172,10 +172,10 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Robert Lemke <robert@typo3.org>
         */
        public function resolveActionMethodNameThrowsAnExceptionIfTheActionDefinedInTheRequestDoesNotExist() {
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array(), array(), '', FALSE);
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array(), array(), '', FALSE);
                $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('fooBar'));
                /** @var \TYPO3\CMS\Extbase\Mvc\Controller\ActionController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('otherBarAction'), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('otherBarAction'), array(), '', FALSE);
                $mockController->_set('request', $mockRequest);
                $mockController->_call('resolveActionMethodName');
        }
@@ -185,12 +185,12 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Robert Lemke <robert@typo3.org>
         */
        public function initializeActionMethodArgumentsRegistersArgumentsFoundInTheSignatureOfTheCurrentActionMethod() {
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array(), array(), '', FALSE);
-               $mockArguments = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Arguments', array('addNewArgument', 'removeAll'));
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array(), array(), '', FALSE);
+               $mockArguments = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array('addNewArgument', 'removeAll'));
                $mockArguments->expects($this->at(0))->method('addNewArgument')->with('stringArgument', 'string', TRUE);
                $mockArguments->expects($this->at(1))->method('addNewArgument')->with('integerArgument', 'integer', TRUE);
                $mockArguments->expects($this->at(2))->method('addNewArgument')->with('objectArgument', 'F3_Foo_Bar', TRUE);
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('fooAction', 'evaluateDontValidateAnnotations'), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('fooAction', 'evaluateDontValidateAnnotations'), array(), '', FALSE);
                $methodParameters = array(
                        'stringArgument' => array(
                                'position' => 0,
@@ -217,7 +217,7 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'type' => 'F3_Foo_Bar'
                        )
                );
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class, array(), array(), '', FALSE);
                $mockReflectionService->expects($this->once())->method('getMethodParameters')->with(get_class($mockController), 'fooAction')->will($this->returnValue($methodParameters));
                $mockController->_set('reflectionService', $mockReflectionService);
                $mockController->_set('request', $mockRequest);
@@ -231,12 +231,12 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Robert Lemke <robert@typo3.org>
         */
        public function initializeActionMethodArgumentsRegistersOptionalArgumentsAsSuch() {
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array(), array(), '', FALSE);
-               $mockArguments = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Arguments', array(), array(), '', FALSE);
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array(), array(), '', FALSE);
+               $mockArguments = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array(), array(), '', FALSE);
                $mockArguments->expects($this->at(0))->method('addNewArgument')->with('arg1', 'string', TRUE);
                $mockArguments->expects($this->at(1))->method('addNewArgument')->with('arg2', 'array', FALSE, array(21));
                $mockArguments->expects($this->at(2))->method('addNewArgument')->with('arg3', 'string', FALSE, 42);
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('fooAction', 'evaluateDontValidateAnnotations'), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('fooAction', 'evaluateDontValidateAnnotations'), array(), '', FALSE);
                $methodParameters = array(
                        'arg1' => array(
                                'position' => 0,
@@ -264,7 +264,7 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'type' => 'string'
                        )
                );
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class, array(), array(), '', FALSE);
                $mockReflectionService->expects($this->once())->method('getMethodParameters')->with(get_class($mockController), 'fooAction')->will($this->returnValue($methodParameters));
                $mockController->_set('reflectionService', $mockReflectionService);
                $mockController->_set('request', $mockRequest);
@@ -279,9 +279,9 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentTypeException
         */
        public function initializeActionMethodArgumentsThrowsExceptionIfDataTypeWasNotSpecified() {
-               $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array(), array(), '', FALSE);
-               $mockArguments = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Arguments', array(), array(), '', FALSE);
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('fooAction'), array(), '', FALSE);
+               $mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array(), array(), '', FALSE);
+               $mockArguments = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array(), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('fooAction'), array(), '', FALSE);
                $methodParameters = array(
                        'arg1' => array(
                                'position' => 0,
@@ -291,7 +291,7 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'allowsNull' => FALSE
                        )
                );
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class, array(), array(), '', FALSE);
                $mockReflectionService->expects($this->once())->method('getMethodParameters')->with(get_class($mockController), 'fooAction')->will($this->returnValue($methodParameters));
                $mockController->_set('reflectionService', $mockReflectionService);
                $mockController->_set('request', $mockRequest);
@@ -308,13 +308,13 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setViewConfigurationResolvesTemplateRootPathsForTemplateRootPath($configuration, $expected) {
                /** @var ActionController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $mockController */
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('dummy'), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('dummy'), array(), '', FALSE);
                /** @var ConfigurationManagerInterface|\PHPUnit_Framework_MockObject_MockObject $mockConfigurationManager */
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($configuration));
                $mockController->injectConfigurationManager($mockConfigurationManager);
-               $mockController->_set('request', $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request'), array('getControllerExtensionKey'));
-               $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface', array('setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setTemplateRootPaths'));
+               $mockController->_set('request', $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class), array('getControllerExtensionKey'));
+               $view = $this->getMock(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class, array('setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setTemplateRootPaths'));
                $view->expects($this->once())->method('setTemplateRootPaths')->with($expected);
                $mockController->_call('setViewConfiguration', $view);
        }
@@ -382,13 +382,13 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setViewConfigurationResolvesLayoutRootPathsForLayoutRootPath($configuration, $expected) {
                /** @var ActionController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $mockController */
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('dummy'), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('dummy'), array(), '', FALSE);
                /** @var ConfigurationManagerInterface|\PHPUnit_Framework_MockObject_MockObject $mockConfigurationManager */
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($configuration));
                $mockController->injectConfigurationManager($mockConfigurationManager);
-               $mockController->_set('request', $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request'), array('getControllerExtensionKey'));
-               $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface', array('setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setlayoutRootPaths'));
+               $mockController->_set('request', $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class), array('getControllerExtensionKey'));
+               $view = $this->getMock(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class, array('setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setlayoutRootPaths'));
                $view->expects($this->once())->method('setlayoutRootPaths')->with($expected);
                $mockController->_call('setViewConfiguration', $view);
        }
@@ -456,13 +456,13 @@ class ActionControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setViewConfigurationResolvesPartialRootPathsForPartialRootPath($configuration, $expected) {
                /** @var ActionController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $mockController */
-               $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('dummy'), array(), '', FALSE);
+               $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, array('dummy'), array(), '', FALSE);
                /** @var ConfigurationManagerInterface|\PHPUnit_Framework_MockObject_MockObject $mockConfigurationManager */
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($configuration));
                $mockController->injectConfigurationManager($mockConfigurationManager);
-               $mockController->_set('request', $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request'), array('getControllerExtensionKey'));
-               $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface', array('setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setpartialRootPaths'));
+               $mockController->_set('request', $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class), array('getControllerExtensionKey'));
+               $view = $this->getMock(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class, array('setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setpartialRootPaths'));
                $view->expects($this->once())->method('setpartialRootPaths')->with($expected);
                $mockController->_call('setViewConfiguration', $view);
        }
index 2392928..33964a7 100644 (file)
@@ -46,9 +46,9 @@ class ArgumentTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
        public function setUp() {
-               $this->simpleValueArgument = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Argument', array('dummy'), array('someName', 'string'));
-               $this->objectArgument = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Argument', array('dummy'), array('someName', 'DateTime'));
-               $this->mockPropertyMapper = $this->getMock('TYPO3\\CMS\\Extbase\\Property\\PropertyMapper');
+               $this->simpleValueArgument = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('dummy'), array('someName', 'string'));
+               $this->objectArgument = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('dummy'), array('someName', 'DateTime'));
+               $this->mockPropertyMapper = $this->getMock(\TYPO3\CMS\Extbase\Property\PropertyMapper::class);
                $this->simpleValueArgument->_set('propertyMapper', $this->mockPropertyMapper);
                $this->objectArgument->_set('propertyMapper', $this->mockPropertyMapper);
                $this->mockConfiguration = new \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration();
@@ -149,7 +149,7 @@ class ArgumentTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
        public function setValidatorShouldProvideFluentInterfaceAndReallySetValidator() {
-               $mockValidator = $this->getMock('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ValidatorInterface');
+               $mockValidator = $this->getMock(\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface::class);
                $returnedArgument = $this->simpleValueArgument->setValidator($mockValidator);
                $this->assertSame($this->simpleValueArgument, $returnedArgument, 'The returned argument is not the original argument.');
                $this->assertSame($mockValidator, $this->simpleValueArgument->getValidator());
@@ -170,7 +170,7 @@ class ArgumentTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setValueUsesNullAsIs() {
                $this->simpleValueArgument = new \TYPO3\CMS\Extbase\Mvc\Controller\Argument('dummy', 'string');
-               $this->simpleValueArgument = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Argument', array('dummy'), array('dummy', 'string'));
+               $this->simpleValueArgument = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('dummy'), array('dummy', 'string'));
                $this->simpleValueArgument->setValue(NULL);
                $this->assertNull($this->simpleValueArgument->getValue());
        }
@@ -217,7 +217,7 @@ class ArgumentTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setValueShouldSetValidationErrorsIfValidatorIsSetAndValidationFailed() {
                $error = new \TYPO3\CMS\Extbase\Error\Error('Some Error', 1234);
-               $mockValidator = $this->getMock('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ValidatorInterface', array('validate', 'getOptions'));
+               $mockValidator = $this->getMock(\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface::class, array('validate', 'getOptions'));
                $validationMessages = new \TYPO3\CMS\Extbase\Error\Result();
                $validationMessages->addError($error);
                $mockValidator->expects($this->once())->method('validate')->with('convertedValue')->will($this->returnValue($validationMessages));
@@ -232,7 +232,7 @@ class ArgumentTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
        public function defaultPropertyMappingConfigurationDoesNotAllowCreationOrModificationOfObjects() {
-               $this->assertNull($this->simpleValueArgument->getPropertyMappingConfiguration()->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
-               $this->assertNull($this->simpleValueArgument->getPropertyMappingConfiguration()->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
+               $this->assertNull($this->simpleValueArgument->getPropertyMappingConfiguration()->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
+               $this->assertNull($this->simpleValueArgument->getPropertyMappingConfiguration()->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
        }
 }
index b4a42d6..df8d83a 100644 (file)
@@ -43,10 +43,10 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function addingAnArgumentReplacesArgumentWithSameName() {
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
-               $mockFirstArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockFirstArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockFirstArgument->expects($this->any())->method('getName')->will($this->returnValue('argumentName1234'));
                $arguments->addArgument($mockFirstArgument);
-               $mockSecondArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockSecondArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockSecondArgument->expects($this->any())->method('getName')->will($this->returnValue('argumentName1234'));
                $arguments->addArgument($mockSecondArgument);
                $this->assertSame($mockSecondArgument, $arguments->getArgument('argumentName1234'), 'The added and retrieved argument is not the same.');
@@ -56,10 +56,10 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function addNewArgumentProvidesFluentInterface() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array(), array(), '', FALSE);
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
-               $arguments = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Arguments', array('dummy'));
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array(), array(), '', FALSE);
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class)->will($this->returnValue($mockArgument));
+               $arguments = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array('dummy'));
                $arguments->_set('objectManager', $mockObjectManager);
                $newArgument = $arguments->addNewArgument('someArgument');
                $this->assertSame($newArgument, $mockArgument);
@@ -69,7 +69,7 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function addingArgumentThroughArrayAccessWorks() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('argumentName1234'));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments[] = $mockArgument;
@@ -81,7 +81,7 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function retrievingArgumentThroughArrayAccessWorks() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('argumentName1234'));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments[] = $mockArgument;
@@ -104,7 +104,7 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function issetReturnsCorrectResult() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('argumentName1234'));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $this->assertFalse(isset($arguments['argumentName1234']), 'isset() did not return FALSE.');
@@ -116,11 +116,11 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getArgumentNamesReturnsNamesOfAddedArguments() {
-               $mockArgument1 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument1 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument1->expects($this->any())->method('getName')->will($this->returnValue('argumentName1'));
-               $mockArgument2 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument2 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument2->expects($this->any())->method('getName')->will($this->returnValue('argumentName2'));
-               $mockArgument3 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument3 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument3->expects($this->any())->method('getName')->will($this->returnValue('argumentName3'));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments[] = $mockArgument1;
@@ -134,13 +134,13 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getArgumentShortNamesReturnsShortNamesOfAddedArguments() {
-               $mockArgument1 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName', 'getShortName'), array(), '', FALSE);
+               $mockArgument1 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName', 'getShortName'), array(), '', FALSE);
                $mockArgument1->expects($this->any())->method('getName')->will($this->returnValue('argumentName1'));
                $mockArgument1->expects($this->any())->method('getShortName')->will($this->returnValue('a'));
-               $mockArgument2 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName', 'getShortName'), array(), '', FALSE);
+               $mockArgument2 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName', 'getShortName'), array(), '', FALSE);
                $mockArgument2->expects($this->any())->method('getName')->will($this->returnValue('argumentName2'));
                $mockArgument2->expects($this->any())->method('getShortName')->will($this->returnValue('b'));
-               $mockArgument3 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName', 'getShortName'), array(), '', FALSE);
+               $mockArgument3 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName', 'getShortName'), array(), '', FALSE);
                $mockArgument3->expects($this->any())->method('getName')->will($this->returnValue('argumentName3'));
                $mockArgument3->expects($this->any())->method('getShortName')->will($this->returnValue('c'));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
@@ -155,14 +155,14 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function addNewArgumentCreatesAndAddsNewArgument() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('dummyName'));
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
-               $arguments = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Arguments', array('dummy'));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class)->will($this->returnValue($mockArgument));
+               $arguments = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array('dummy'));
                $arguments->_set('objectManager', $mockObjectManager);
                $addedArgument = $arguments->addNewArgument('dummyName');
-               $this->assertInstanceOf('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', $addedArgument, 'addNewArgument() either did not add a new argument or did not return it.');
+               $this->assertInstanceOf(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, $addedArgument, 'addNewArgument() either did not add a new argument or did not return it.');
                $retrievedArgument = $arguments['dummyName'];
                $this->assertSame($addedArgument, $retrievedArgument, 'The added and the retrieved argument are not the same.');
        }
@@ -171,11 +171,11 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function addNewArgumentAssumesTextDataTypeByDefault() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('dummyName'));
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
-               $arguments = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Arguments', array('dummy'));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, 'dummyName', 'Text')->will($this->returnValue($mockArgument));
+               $arguments = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array('dummy'));
                $arguments->_set('objectManager', $mockObjectManager);
                $arguments->addNewArgument('dummyName');
        }
@@ -184,12 +184,12 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function addNewArgumentCanAddArgumentsMarkedAsRequired() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName', 'setRequired'), array(), '', FALSE);
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName', 'setRequired'), array(), '', FALSE);
                $mockArgument->expects($this->once())->method('getName')->will($this->returnValue('dummyName'));
                $mockArgument->expects($this->once())->method('setRequired')->with(TRUE);
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
-               $arguments = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Arguments', array('dummy'));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, 'dummyName', 'Text')->will($this->returnValue($mockArgument));
+               $arguments = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array('dummy'));
                $arguments->_set('objectManager', $mockObjectManager);
                $arguments->addNewArgument('dummyName', 'Text', TRUE);
        }
@@ -198,13 +198,13 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function addNewArgumentCanAddArgumentsMarkedAsOptionalWithDefaultValues() {
-               $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName', 'setRequired', 'setDefaultValue'), array(), '', FALSE);
+               $mockArgument = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName', 'setRequired', 'setDefaultValue'), array(), '', FALSE);
                $mockArgument->expects($this->once())->method('getName')->will($this->returnValue('dummyName'));
                $mockArgument->expects($this->once())->method('setRequired')->with(FALSE);
                $mockArgument->expects($this->once())->method('setDefaultValue')->with('someDefaultValue');
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
-               $arguments = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Arguments', array('dummy'));
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, 'dummyName', 'Text')->will($this->returnValue($mockArgument));
+               $arguments = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array('dummy'));
                $arguments->_set('objectManager', $mockObjectManager);
                $arguments->addNewArgument('dummyName', 'Text', FALSE, 'someDefaultValue');
        }
@@ -224,9 +224,9 @@ class ArgumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Christopher Hlubek <hlubek@networkteam.com>
         */
        public function removeAllClearsAllArguments() {
-               $mockArgument1 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName', 'getShortName'), array(), '', FALSE);
+               $mockArgument1 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName', 'getShortName'), array(), '', FALSE);
                $mockArgument1->expects($this->any())->method('getName')->will($this->returnValue('argumentName1'));
-               $mockArgument2 = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName', 'getShortName'), array(), '', FALSE);
+               $mockArgument2 = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName', 'getShortName'), array(), '', FALSE);
                $mockArgument2->expects($this->any())->method('getName')->will($this->returnValue('argumentName2'));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments[] = $mockArgument1;
index a46da96..2e031c1 100644 (file)
@@ -25,14 +25,14 @@ class CommandControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $commandController;
 
        public function setUp() {
-               $this->commandController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\CommandController', array('dummyCommand'));
+               $this->commandController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\CommandController::class, array('dummyCommand'));
        }
 
        /**
         * @test
         */
        public function outputAppendsGivenStringToTheResponseContent() {
-               $mockResponse = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
+               $mockResponse = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Response::class);
                $mockResponse->expects($this->once())->method('appendContent')->with('some text');
                $this->commandController->_set('response', $mockResponse);
                $this->commandController->_call('output', 'some text');
@@ -42,7 +42,7 @@ class CommandControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function outputReplacesArgumentsInGivenString() {
-               $mockResponse = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
+               $mockResponse = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Response::class);
                $mockResponse->expects($this->once())->method('appendContent')->with('some text');
                $this->commandController->_set('response', $mockResponse);
                $this->commandController->_call('output', '%2$s %1$s', array('text', 'some'));
@@ -52,7 +52,7 @@ class CommandControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function outputLineAppendsGivenStringAndNewlineToTheResponseContent() {
-               $mockResponse = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
+               $mockResponse = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Response::class);
                $mockResponse->expects($this->once())->method('appendContent')->with('some text' . PHP_EOL);
                $this->commandController->_set('response', $mockResponse);
                $this->commandController->_call('outputLine', 'some text');
@@ -63,7 +63,7 @@ class CommandControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
         */
        public function quitThrowsStopActionException() {
-               $mockResponse = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
+               $mockResponse = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Response::class);
                $this->commandController->_set('response', $mockResponse);
                $this->commandController->_call('quit');
        }
@@ -73,7 +73,7 @@ class CommandControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
         */
        public function quitSetsResponseExitCode() {
-               $mockResponse = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
+               $mockResponse = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Cli\Response::class);
                $mockResponse->expects($this->once())->method('setExitCode')->with(123);
                $this->commandController->_set('response', $mockResponse);
                $this->commandController->_call('quit', 123);
@@ -83,7 +83,7 @@ class CommandControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function settingRequestAdminPropertySetsAdminRoleInUserAuthentication() {
-               $mockedUserAuthentication = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+               $mockedUserAuthentication = $this->getMock(\TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::class);
                $mockedUserAuthentication->user['admin'] = 42;
                $this->commandController->expects($this->once())
                        ->method('dummyCommand')
index 2dc0084..39ef9cb 100644 (file)
@@ -116,7 +116,7 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Core\Tests\U
         * @dataProvider dataProviderForgenerateTrustedPropertiesToken
         */
        public function generateTrustedPropertiesTokenGeneratesTheCorrectHashesInNormalOperation($input, $expected) {
-               $requestHashService = $this->getMock('TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService', array('serializeAndHashFormFieldArray'));
+               $requestHashService = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class, array('serializeAndHashFormFieldArray'));
                $requestHashService->expects($this->once())->method('serializeAndHashFormFieldArray')->with($expected);
                $requestHashService->generateTrustedPropertiesToken($input);
        }
@@ -127,7 +127,7 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Core\Tests\U
         * @expectedException \TYPO3\CMS\Extbase\Security\Exception\InvalidArgumentForHashGenerationException
         */
        public function generateTrustedPropertiesTokenThrowsExceptionInWrongCases($input) {
-               $requestHashService = $this->getMock('TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService', array('serializeAndHashFormFieldArray'));
+               $requestHashService = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class, array('serializeAndHashFormFieldArray'));
                $requestHashService->generateTrustedPropertiesToken($input);
        }
 
@@ -143,10 +143,10 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Core\Tests\U
                );
                $mockHash = '12345';
 
-               $hashService = $this->getMock($this->buildAccessibleProxy('TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService'), array('appendHmac'));
+               $hashService = $this->getMock($this->buildAccessibleProxy(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class), array('appendHmac'));
                $hashService->expects($this->once())->method('appendHmac')->with(serialize($formFieldArray))->will($this->returnValue(serialize($formFieldArray) . $mockHash));
 
-               $requestHashService = $this->getMock($this->buildAccessibleProxy('TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService'), array('dummy'));
+               $requestHashService = $this->getMock($this->buildAccessibleProxy(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class), array('dummy'));
                $requestHashService->_set('hashService', $hashService);
 
                $expected = serialize($formFieldArray) . $mockHash;
@@ -158,7 +158,7 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Core\Tests\U
         * @test
         */
        public function initializePropertyMappingConfigurationDoesNothingIfTrustedPropertiesAreNotSet() {
-               $request = $this->getMockBuilder('TYPO3\CMS\Extbase\Mvc\Request')->setMethods(array('getInternalArgument'))->disableOriginalConstructor()->getMock();
+               $request = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\Request::class)->setMethods(array('getInternalArgument'))->disableOriginalConstructor()->getMock();
                $request->expects($this->any())->method('getInternalArgument')->with('__trustedProperties')->will($this->returnValue(NULL));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
 
@@ -201,12 +201,12 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Core\Tests\U
                );
                $arguments = $this->initializePropertyMappingConfiguration($trustedProperties);
                $propertyMappingConfiguration = $arguments->getArgument('foo')->getPropertyMappingConfiguration();
-               $this->assertTrue($propertyMappingConfiguration->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED), 'ConfigurationValue is not CONFIGURATION_MODIFICATION_ALLOWED at line ' . __LINE__);
-               $this->assertNull($propertyMappingConfiguration->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED), 'ConfigurationValue is not NULL at line ' . __LINE__);
+               $this->assertTrue($propertyMappingConfiguration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED), 'ConfigurationValue is not CONFIGURATION_MODIFICATION_ALLOWED at line ' . __LINE__);
+               $this->assertNull($propertyMappingConfiguration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED), 'ConfigurationValue is not NULL at line ' . __LINE__);
                $this->assertFalse($propertyMappingConfiguration->shouldMap('someProperty'), 'Value is not FALSE at line ' . __LINE__);
 
-               $this->assertTrue($propertyMappingConfiguration->forProperty('nested')->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED), 'ConfigurationValue is not CONFIGURATION_MODIFICATION_ALLOWED at line ' . __LINE__);
-               $this->assertNull($propertyMappingConfiguration->forProperty('nested')->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED), 'ConfigurationValue is not NULL at line ' . __LINE__);
+               $this->assertTrue($propertyMappingConfiguration->forProperty('nested')->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED), 'ConfigurationValue is not CONFIGURATION_MODIFICATION_ALLOWED at line ' . __LINE__);
+               $this->assertNull($propertyMappingConfiguration->forProperty('nested')->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED), 'ConfigurationValue is not NULL at line ' . __LINE__);
                $this->assertFalse($propertyMappingConfiguration->forProperty('nested')->shouldMap('someProperty'), 'Value is not FALSE at line ' . __LINE__);
        }
 
@@ -221,12 +221,12 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Core\Tests\U
                );
                $arguments = $this->initializePropertyMappingConfiguration($trustedProperties);
                $propertyMappingConfiguration = $arguments->getArgument('foo')->getPropertyMappingConfiguration();
-               $this->assertNull($propertyMappingConfiguration->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
-               $this->assertTrue($propertyMappingConfiguration->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
+               $this->assertNull($propertyMappingConfiguration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
+               $this->assertTrue($propertyMappingConfiguration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
                $this->assertFalse($propertyMappingConfiguration->shouldMap('someProperty'));
 
-               $this->assertNull($propertyMappingConfiguration->forProperty('bar')->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
-               $this->assertTrue($propertyMappingConfiguration->forProperty('bar')->getConfigurationValue('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
+               $this->assertNull($propertyMappingConfiguration->forProperty('bar')->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
+               $this->assertTrue($propertyMappingConfiguration->forProperty('bar')->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
                $this->assertFalse($propertyMappingConfiguration->forProperty('bar')->shouldMap('someProperty'));
        }
 
@@ -271,25 +271,25 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Core\Tests\U
         * @return \TYPO3\CMS\Extbase\Mvc\Controller\Arguments
         */
        protected function initializePropertyMappingConfiguration(array $trustedProperties) {
-               $request = $this->getMockBuilder('TYPO3\CMS\Extbase\Mvc\Request')->setMethods(array('getInternalArgument'))->disableOriginalConstructor()->getMock();
+               $request = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\Request::class)->setMethods(array('getInternalArgument'))->disableOriginalConstructor()->getMock();
                $request->expects($this->any())->method('getInternalArgument')->with('__trustedProperties')->will($this->returnValue('fooTrustedProperties'));
 
-               $mockHashService = $this->getMock('TYPO3\CMS\Extbase\Security\Cryptography\HashService', array('validateAndStripHmac'));
+               $mockHashService = $this->getMock(\TYPO3\CMS\Extbase\Security\Cryptography\HashService::class, array('validateAndStripHmac'));
                $mockHashService->expects($this->once())->method('validateAndStripHmac')->with('fooTrustedProperties')->will($this->returnValue(serialize($trustedProperties)));
 
-               $requestHashService = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService', array('dummy'));
+               $requestHashService = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class, array('dummy'));
                $requestHashService->_set('hashService', $mockHashService);
 
-               $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockArgument = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
+               $mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $mockArgument = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class, array('getName'), array(), '', FALSE);
 
                $propertyMappingConfiguration = new \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration();
 
                $mockArgument->_set('propertyMappingConfiguration', $propertyMappingConfiguration);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('foo'));
-               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
+               $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Controller\Argument::class)->will($this->returnValue($mockArgument));
 
-               $arguments = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\Controller\Arguments', array('dummy'));
+               $arguments = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class, array('dummy'));
                $arguments->_set('objectManager', $mockObjectManager);
                $arguments->addNewArgument('foo');
 
index 9c86403..f99cdde 100644 (file)
@@ -78,7 +78,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Bastian Waidelich <bastian@typo3.org>
         */
        public function setArgumentsCallsSetArgumentForEveryArrayEntry() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('setArgument'));
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('setArgument'));
                $request->expects($this->at(0))->method('setArgument')->with('key1', 'value1');
                $request->expects($this->at(1))->method('setArgument')->with('key2', 'value2');
                $request->setArguments(array('key1' => 'value1', 'key2' => 'value2'));
@@ -88,7 +88,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setArgumentShouldSetControllerExtensionNameIfPackageKeyIsGiven() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('setControllerExtensionName'));
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('setControllerExtensionName'));
                $request->expects($this->any())->method('setControllerExtensionName')->with('MyExtension');
                $request->setArgument('@extension', 'MyExtension');
                $this->assertFalse($request->hasArgument('@extension'));
@@ -98,7 +98,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setArgumentShouldSetControllerSubpackageKeyIfSubpackageKeyIsGiven() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('setControllerSubpackageKey'));
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('setControllerSubpackageKey'));
                $request->expects($this->any())->method('setControllerSubpackageKey')->with('MySubPackage');
                $request->setArgument('@subpackage', 'MySubPackage');
                $this->assertFalse($request->hasArgument('@subpackage'));
@@ -108,7 +108,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setArgumentShouldSetControllerNameIfControllerIsGiven() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('setControllerName'));
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('setControllerName'));
                $request->expects($this->any())->method('setControllerName')->with('MyController');
                $request->setArgument('@controller', 'MyController');
                $this->assertFalse($request->hasArgument('@controller'));
@@ -118,7 +118,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setArgumentShouldSetControllerActionNameIfActionIsGiven() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('setControllerActionName'));
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('setControllerActionName'));
                $request->expects($this->any())->method('setControllerActionName')->with('foo');
                $request->setArgument('@action', 'foo');
                $this->assertFalse($request->hasArgument('@action'));
@@ -128,7 +128,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setArgumentShouldSetFormatIfFormatIsGiven() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('setFormat'));
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('setFormat'));
                $request->expects($this->any())->method('setFormat')->with('txt');
                $request->setArgument('@format', 'txt');
                $this->assertFalse($request->hasArgument('@format'));
@@ -138,7 +138,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setArgumentShouldSetVendorIfVendorIsGiven() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('setFormat'));
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('setFormat'));
                $request->expects($this->any())->method('setVendor')->with('VENDOR');
                $request->setArgument('@vendor', 'VENDOR');
                $this->assertFalse($request->hasArgument('@vendor'));
@@ -212,7 +212,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @author Robert Lemke <robert@typo3.org>
         */
        public function theActionNameCanBeSetAndRetrieved() {
-               $request = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('getControllerObjectName'), array(), '', FALSE);
+               $request = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('getControllerObjectName'), array(), '', FALSE);
                $request->expects($this->once())->method('getControllerObjectName')->will($this->returnValue(''));
                $request->setControllerActionName('theAction');
                $this->assertEquals('theAction', $request->getControllerActionName());
@@ -272,7 +272,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                        'subpackageKey' => 'ViewHelpers\\Widget',
                                        'controllerName' => 'Paginate',
                                ),
-                               'TYPO3\\CMS\\Fluid\\ViewHelpers\\Widget\\Controller\\PaginateController',
+                               \TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController::class,
                        ),
                        'Vendor VENDOR, extension, controller given' => array(
                                array(
@@ -322,7 +322,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getControllerObjectNameResolvesControllerObjectNameCorrectly($controllerArguments, $controllerObjectName) {
                /** @var $request \TYPO3\CMS\Extbase\Mvc\Request */
-               $request = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('dummy'));
+               $request = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('dummy'));
                $request->_set('controllerVendorName', $controllerArguments['vendorName']);
                $request->_set('controllerExtensionName', $controllerArguments['extensionName']);
                $request->_set('controllerSubpackageKey', $controllerArguments['subpackageKey']);
@@ -340,7 +340,7 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setControllerObjectNameResolvesControllerObjectNameArgumentsCorrectly($controllerArguments, $controllerObjectName) {
                /** @var $request \TYPO3\CMS\Extbase\Mvc\Request */
-               $request = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('dummy'));
+               $request = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('dummy'));
                $request->setControllerObjectName($controllerObjectName);
 
                $actualControllerArguments = array(
index b23685a..71e3671 100644 (file)
@@ -25,7 +25,7 @@ class ResponseTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $mockResponse;
 
        public function setUp() {
-               $this->mockResponse = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Response', array('dummy'));
+               $this->mockResponse = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Response::class, array('dummy'));
        }
 
        /**
index 00aedb2..5fc2c0e 100644 (file)
@@ -42,9 +42,9 @@ class JsonViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
-               $this->view = $this->getMock('TYPO3\CMS\Extbase\Mvc\View\JsonView', array('loadConfigurationFromYamlFile'));
-               $this->controllerContext = $this->getMock('TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext', array(), array(), '', FALSE);
-               $this->response = $this->getMock('TYPO3\CMS\Extbase\Mvc\Web\Response', array());
+               $this->view = $this->getMock(\TYPO3\CMS\Extbase\Mvc\View\JsonView::class, array('loadConfigurationFromYamlFile'));
+               $this->controllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', FALSE);
+               $this->response = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Response::class, array());
                $this->controllerContext->expects($this->any())->method('getResponse')->will($this->returnValue($this->response));
                $this->view->setControllerContext($this->controllerContext);
        }
@@ -150,7 +150,7 @@ class JsonViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider jsonViewTestData
         */
        public function testTransformValue($object, $configuration, $expected, $description) {
-               $jsonView = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\View\JsonView', array('dummy'), array(), '', FALSE);
+               $jsonView = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\View\JsonView::class, array('dummy'), array(), '', FALSE);
 
                $actual = $jsonView->_call('transformValue', $object, $configuration);
 
@@ -191,8 +191,8 @@ class JsonViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider objectIdentifierExposureTestData
         */
        public function testTransformValueWithObjectIdentifierExposure($object, $configuration, $expected, $dummyIdentifier, $description) {
-               $persistenceManagerMock = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('getIdentifierByObject'));
-               $jsonView = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\View\JsonView', array('dummy'), array(), '', FALSE);
+               $persistenceManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('getIdentifierByObject'));
+               $jsonView = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\View\JsonView::class, array('dummy'), array(), '', FALSE);
                $jsonView->_set('persistenceManager', $persistenceManagerMock);
 
                $persistenceManagerMock->expects($this->once())->method('getIdentifierByObject')->with($object->value1)->will($this->returnValue($dummyIdentifier));
@@ -249,12 +249,12 @@ class JsonViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                )
                        )
                );
-               $reflectionService = $this->getMock('TYPO3\CMS\Extbase\Reflection\ReflectionService');
+               $reflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
                $reflectionService->expects($this->any())->method('getClassNameByObject')->will($this->returnCallback(function($object) {
                        return get_class($object);
                }));
 
-               $jsonView = $this->getAccessibleMock('TYPO3\CMS\Extbase\Mvc\View\JsonView', array('dummy'), array(), '', FALSE);
+               $jsonView = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\View\JsonView::class, array('dummy'), array(), '', FALSE);
                $this->inject($jsonView, 'reflectionService', $reflectionService);
                $actual = $jsonView->_call('transformValue', $object, $configuration);
                $this->assertEquals($expected, $actual);
index 26e935d..0f63ede 100644 (file)
@@ -55,7 +55,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $mockRequest;
 
        public function setUp() {
-               $this->requestBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\RequestBuilder', array('dummy'));
+               $this->requestBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder::class, array('dummy'));
                $this->configuration = array(
                        'userFunc' => 'Tx_Extbase_Dispatcher->dispatch',
                        'pluginName' => 'Pi1',
@@ -74,11 +74,11 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                )
                        )
                );
-               $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
-               $this->mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $this->mockExtensionService = $this->getMock('TYPO3\\CMS\\Extbase\\Service\\ExtensionService');
-               $this->mockEnvironmentService = $this->getMock('TYPO3\\CMS\\Extbase\\Service\\EnvironmentService', array('getServerRequestMethod'));
+               $this->mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
+               $this->mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $this->mockExtensionService = $this->getMock(\TYPO3\CMS\Extbase\Service\ExtensionService::class);
+               $this->mockEnvironmentService = $this->getMock(\TYPO3\CMS\Extbase\Service\EnvironmentService::class, array('getServerRequestMethod'));
        }
 
        /**
@@ -87,7 +87,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected function injectDependencies() {
                $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
                $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
-               $this->mockObjectManager->expects($this->any())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request')->will($this->returnValue($this->mockRequest));
+               $this->mockObjectManager->expects($this->any())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Web\Request::class)->will($this->returnValue($this->mockRequest));
                $this->requestBuilder->_set('objectManager', $this->mockObjectManager);
                $pluginNamespace = 'tx_' . strtolower(($this->configuration['extensionName'] . '_' . $this->configuration['pluginName']));
                $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue($pluginNamespace));
@@ -167,7 +167,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function buildSetsRequestMethod() {
                $this->injectDependencies();
                $expectedMethod = 'SomeRequestMethod';
-               $mockEnvironmentService = $this->getMock('TYPO3\\CMS\\Extbase\\Service\\EnvironmentService', array('getServerRequestMethod'));
+               $mockEnvironmentService = $this->getMock(\TYPO3\CMS\Extbase\Service\EnvironmentService::class, array('getServerRequestMethod'));
                $mockEnvironmentService->expects($this->once())->method('getServerRequestMethod')->will($this->returnValue($expectedMethod));
                $this->requestBuilder->_set('environmentService', $mockEnvironmentService);
                $this->mockRequest->expects($this->once())->method('setMethod')->with($expectedMethod);
@@ -181,7 +181,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->injectDependencies();
                $expectedVendor = 'Vendor';
                $this->configuration['vendorName'] = $expectedVendor;
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
                $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
                $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
@@ -197,7 +197,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $expectedVendor = 'Vendor';
                $this->configuration['vendorName'] = $expectedVendor;
 
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
                $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
                $this->mockRequest->expects($this->once())->method('setControllerVendorName')->with($expectedVendor);
@@ -205,7 +205,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->requestBuilder->build();
 
                unset($this->configuration['vendorName']);
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
                $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
 
@@ -219,7 +219,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function buildThrowsExceptionIfExtensionNameIsNotConfigured() {
                unset($this->configuration['extensionName']);
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
                $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
                $this->requestBuilder->build();
@@ -231,7 +231,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function buildThrowsExceptionIfPluginNameIsNotConfigured() {
                unset($this->configuration['pluginName']);
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
                $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
                $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
@@ -753,7 +753,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                )
                        )
                );
-               $requestBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\RequestBuilder', array('dummy'), array(), '', FALSE);
+               $requestBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder::class, array('dummy'), array(), '', FALSE);
                $result = $requestBuilder->_call('untangleFilesArray', $convolutedFiles);
                $this->assertSame($untangledFiles, $result);
        }
index 579105a..b06ec8a 100644 (file)
@@ -45,19 +45,19 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $uriBuilder;
 
        public function setUp() {
-               $GLOBALS['TSFE'] = $this->getMock('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', array(), array(), '', FALSE);
-               $this->mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
-               $this->mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
-               $this->mockExtensionService = $this->getMock('TYPO3\\CMS\\Extbase\\Service\\ExtensionService');
-               $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
-               $this->uriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('build'));
+               $GLOBALS['TSFE'] = $this->getMock(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, array(), array(), '', FALSE);
+               $this->mockContentObject = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+               $this->mockRequest = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
+               $this->mockExtensionService = $this->getMock(\TYPO3\CMS\Extbase\Service\ExtensionService::class);
+               $this->mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
+               $this->uriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('build'));
                $this->uriBuilder->setRequest($this->mockRequest);
                $this->uriBuilder->_set('contentObject', $this->mockContentObject);
                $this->uriBuilder->_set('configurationManager', $this->mockConfigurationManager);
                $this->uriBuilder->_set('extensionService', $this->mockExtensionService);
-               $this->uriBuilder->_set('environmentService', $this->getMock('TYPO3\\CMS\\Extbase\\Service\\EnvironmentService'));
+               $this->uriBuilder->_set('environmentService', $this->getMock(\TYPO3\CMS\Extbase\Service\EnvironmentService::class));
                // Mocking backend user is required for backend URI generation as BackendUtility::getModuleUrl() is called
-               $backendUserMock = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $backendUserMock = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
                $backendUserMock->expects($this->any())->method('check')->will($this->returnValue(TRUE));
                $GLOBALS['BE_USER'] = $backendUserMock;
        }
@@ -301,7 +301,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function buildBackendUriConvertsDomainObjectsAfterArgumentsHaveBeenMerged() {
                \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset(array('M' => 'moduleKey'));
-               $mockDomainObject = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', array('dummy'));
+               $mockDomainObject = $this->getAccessibleMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class, array('dummy'));
                $mockDomainObject->_set('uid', '123');
                $this->uriBuilder->setArguments(array('somePrefix' => array('someDomainObject' => $mockDomainObject)));
                $expectedResult = 'mod.php?M=moduleKey&moduleToken=dummyToken&somePrefix%5BsomeDomainObject%5D=123';
@@ -411,7 +411,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function buildFrontendUriCreatesTypoLink() {
                /** @var \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $uriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('buildTypolinkConfiguration'));
+               $uriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('buildTypolinkConfiguration'));
                $uriBuilder->_set('contentObject', $this->mockContentObject);
                $uriBuilder->expects($this->once())->method('buildTypolinkConfiguration')->will($this->returnValue(array('someTypoLinkConfiguration')));
                $this->mockContentObject->expects($this->once())->method('typoLink_URL')->with(array('someTypoLinkConfiguration'));
@@ -443,7 +443,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function buildFrontendUriCreatesAbsoluteUrisIfSpecified() {
                /** @var \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $uriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('buildTypolinkConfiguration'));
+               $uriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('buildTypolinkConfiguration'));
                $uriBuilder->_set('contentObject', $this->mockContentObject);
                $uriBuilder->expects($this->once())->method('buildTypolinkConfiguration')->will($this->returnValue(array('foo' => 'bar')));
                $this->mockContentObject->expects($this->once())->method('typoLink_URL')->with(array('foo' => 'bar', 'forceAbsoluteUrl' => TRUE))->will($this->returnValue('http://baseuri/relative/uri'));
@@ -458,7 +458,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function buildFrontendUriSetsAbsoluteUriSchemeIfSpecified() {
                /** @var \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $uriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('buildTypolinkConfiguration'));
+               $uriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('buildTypolinkConfiguration'));
                $uriBuilder->_set('contentObject', $this->mockContentObject);
                $uriBuilder->expects($this->once())->method('buildTypolinkConfiguration')->will($this->returnValue(array('foo' => 'bar')));
                $this->mockContentObject->expects($this->once())->method('typoLink_URL')->with(array('foo' => 'bar', 'forceAbsoluteUrl' => TRUE, 'forceAbsoluteUrl.' => array('scheme' => 'someScheme')))->will($this->returnValue('http://baseuri/relative/uri'));
@@ -474,7 +474,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function buildFrontendUriDoesNotSetAbsoluteUriSchemeIfCreateAbsoluteUriIsFalse() {
                /** @var \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $uriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('buildTypolinkConfiguration'));
+               $uriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('buildTypolinkConfiguration'));
                $uriBuilder->_set('contentObject', $this->mockContentObject);
                $uriBuilder->expects($this->once())->method('buildTypolinkConfiguration')->will($this->returnValue(array('foo' => 'bar')));
                $this->mockContentObject->expects($this->once())->method('typoLink_URL')->with(array('foo' => 'bar'))->will($this->returnValue('http://baseuri/relative/uri'));
@@ -565,9 +565,9 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function buildTypolinkConfigurationConvertsDomainObjects() {
-               $mockDomainObject1 = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', array('dummy'));
+               $mockDomainObject1 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class, array('dummy'));
                $mockDomainObject1->_set('uid', '123');
-               $mockDomainObject2 = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', array('dummy'));
+               $mockDomainObject2 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class, array('dummy'));
                $mockDomainObject2->_set('uid', '321');
                $this->uriBuilder->setTargetPageUid(123);
                $this->uriBuilder->setArguments(array('someDomainObject' => $mockDomainObject1, 'baz' => array('someOtherDomainObject' => $mockDomainObject2)));
@@ -583,7 +583,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->uriBuilder->setTargetPageUid(123);
                $this->uriBuilder->setFormat('txt');
 
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')
                        ->will($this->returnValue(array('view' => array('formatToPageTypeMapping' => array('txt' => 2)))));
                $this->uriBuilder->_set('configurationManager', $mockConfigurationManager);
@@ -604,7 +604,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->uriBuilder->setTargetPageUid(123);
                $this->uriBuilder->setFormat('txt');
 
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue(array()));
                $this->uriBuilder->_set('configurationManager', $mockConfigurationManager);
 
@@ -625,7 +625,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->uriBuilder->setTargetPageUid(123);
                $this->uriBuilder->setFormat('txt');
 
-               $mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
+               $mockConfigurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class);
                $mockConfigurationManager->expects($this->any())->method('getConfiguration')
                        ->will($this->returnValue(array(array('view' => array('formatToPageTypeMapping' => array('pdf' => 2))))));
                $this->uriBuilder->_set('configurationManager', $mockConfigurationManager);
@@ -689,9 +689,9 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function convertDomainObjectsToIdentityArraysConvertsDomainObjects() {
-               $mockDomainObject1 = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', array('dummy'));
+               $mockDomainObject1 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class, array('dummy'));
                $mockDomainObject1->_set('uid', '123');
-               $mockDomainObject2 = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity', array('dummy'));
+               $mockDomainObject2 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class, array('dummy'));
                $mockDomainObject2->_set('uid', '321');
                $expectedResult = array('foo' => array('bar' => 'baz'), 'domainObject1' => '123', 'second' => array('domainObject2' => '321'));
                $actualResult = $this->uriBuilder->_call('convertDomainObjectsToIdentityArrays', array('foo' => array('bar' => 'baz'), 'domainObject1' => $mockDomainObject1, 'second' => array('domainObject2' => $mockDomainObject2)));
@@ -707,7 +707,7 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject { public $name; public $uid; }');
                $mockValueObject = new $classNameWithNS();
                $mockValueObject->name = 'foo';
-               $mockUriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('convertTransientObjectToArray'));
+               $mockUriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('convertTransientObjectToArray'));
                $mockUriBuilder->expects($this->once())->method('convertTransientObjectToArray')->will($this->returnValue(array('foo' => 'bar')));
                $actualResult = $mockUriBuilder->_call('convertDomainObjectsToIdentityArrays', array('object' => $mockValueObject));
                $expectedResult = array('object' => array('foo' => 'bar'));
@@ -721,10 +721,10 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function conversionOfTansientObjectsThrowsExceptionForOtherThanValueObjects() {
                $className = uniqid('FixturesObject_');
                $classNameWithNS = __NAMESPACE__ . '\\' . $className;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity { public $name; public $uid; }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' { public $name; public $uid; }');
                $mockEntity = new $classNameWithNS();
                $mockEntity->name = 'foo';
-               $mockUriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('dummy'));
+               $mockUriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('dummy'));
                $mockUriBuilder->_call('convertDomainObjectsToIdentityArrays', array('object' => $mockEntity));
        }
 
@@ -734,10 +734,10 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function tansientObjectsAreConvertedToAnArrayOfProperties() {
                $className = uniqid('FixturesObject_');
                $classNameWithNS = __NAMESPACE__ . '\\' . $className;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject { public $name; public $uid; }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class . ' { public $name; public $uid; }');
                $mockValueObject = new $classNameWithNS();
                $mockValueObject->name = 'foo';
-               $mockUriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('dummy'));
+               $mockUriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('dummy'));
                $actualResult = $mockUriBuilder->_call('convertTransientObjectToArray', $mockValueObject);
                $expectedResult = array('name' => 'foo', 'uid' => NULL, 'pid' => NULL);
                $this->assertEquals($expectedResult, $actualResult);
@@ -749,21 +749,21 @@ class UriBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function tansientObjectsAreRecursivelyConverted() {
                $className = uniqid('FixturesObject_');
                $classNameWithNS = __NAMESPACE__ . '\\' . $className;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject { public $name; public $uid; }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class . ' { public $name; public $uid; }');
                $mockInnerValueObject2 = new $classNameWithNS();
                $mockInnerValueObject2->name = 'foo';
                $mockInnerValueObject2->uid = 99;
                $className = uniqid('FixturesObject_');
                $classNameWithNS = __NAMESPACE__ . '\\' . $className;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject { public $object; public $uid; }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class . ' { public $object; public $uid; }');
                $mockInnerValueObject1 = new $classNameWithNS();
                $mockInnerValueObject1->object = $mockInnerValueObject2;
                $className = uniqid('FixturesObject_');
                $classNameWithNS = __NAMESPACE__ . '\\' . $className;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractValueObject { public $object; public $uid; }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class . ' { public $object; public $uid; }');
                $mockValueObject = new $classNameWithNS();
                $mockValueObject->object = $mockInnerValueObject1;
-               $mockUriBuilder = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder', array('dummy'));
+               $mockUriBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class, array('dummy'));
                $actualResult = $mockUriBuilder->_call('convertTransientObjectToArray', $mockValueObject);
                $expectedResult = array(
                        'object' => array(
index 8136bfe..dfeed61 100644 (file)
@@ -53,8 +53,8 @@ class ClassInfoFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function buildClassInfoDetectsPropertiesToInjectByAnnotation() {
-               $classInfo = $this->classInfoFactory->buildClassInfoFromClassName('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithInjectProperties');
-               $this->assertEquals(array('secondDummyClass' => 'TYPO3\\CMS\\Extbase\\Tests\\Fixture\\SecondDummyClass'), $classInfo->getInjectProperties());
+               $classInfo = $this->classInfoFactory->buildClassInfoFromClassName(\TYPO3\CMS\Extbase\Tests\Fixture\ClassWithInjectProperties::class);
+               $this->assertEquals(array('secondDummyClass' => \TYPO3\CMS\Extbase\Tests\Fixture\SecondDummyClass::class), $classInfo->getInjectProperties());
        }
 
        /**
@@ -63,7 +63,7 @@ class ClassInfoFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function buildClassInfoReturnsCustomClassInfoForDateTime() {
 
                /** @var \PHPUnit_Framework_MockObject_MockObject | \TYPO3\CMS\Extbase\Object\Container\ClassInfoFactory $classInfoFactory */
-               $classInfoFactory = $this->getMock('TYPO3\CMS\Extbase\Object\Container\ClassInfoFactory', array('dummy'));
+               $classInfoFactory = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\ClassInfoFactory::class, array('dummy'));
                $classInfoFactory->expects($this->never())->method('getConstructorArguments');
 
                $classInfo = $classInfoFactory->buildClassInfoFromClassName('DateTime');
index 02303dd..1ba134d 100644 (file)
@@ -34,10 +34,10 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
        public function setUp() {
                // The mocked cache will always indicate that he has nothing in the cache to force that we get the real class info
-               $mockedCache = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\Container\\ClassInfoCache', array('get', 'set'));
+               $mockedCache = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\ClassInfoCache::class, array('get', 'set'));
                $mockedCache->expects($this->any())->method('get')->will($this->returnValue(FALSE));
                $mockedCache->expects($this->never())->method('has');
-               $this->container = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\Container\\Container', array('log', 'getClassInfoCache'));
+               $this->container = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\Container::class, array('log', 'getClassInfoCache'));
                $this->container->expects($this->any())->method('getClassInfoCache')->will($this->returnValue($mockedCache));
        }
 
@@ -53,8 +53,8 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getInstanceReturnsInstanceOfSimpleNamespacedClass() {
-               $object = $this->container->getInstance('TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\NamespacedClass');
-               $this->assertInstanceOf('TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\NamespacedClass', $object);
+               $object = $this->container->getInstance(\TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\NamespacedClass::class);
+               $this->assertInstanceOf(\TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\NamespacedClass::class, $object);
        }
 
        /**
@@ -167,16 +167,16 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getInstanceUsesClassNameMd5AsCacheKey() {
-               $className = 'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\NamespacedClass';
+               $className = \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\NamespacedClass::class;
                $classNameHash = md5($className);
-               $mockedCache = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\Container\\ClassInfoCache', array('has', 'set', 'get'));
-               $container = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\Container\\Container', array('log', 'getClassInfoCache'));
+               $mockedCache = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\ClassInfoCache::class, array('has', 'set', 'get'));
+               $container = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\Container::class, array('log', 'getClassInfoCache'));
                $container->expects($this->any())->method('getClassInfoCache')->will($this->returnValue($mockedCache));
                $mockedCache->expects($this->never())->method('has');
                $mockedCache->expects($this->once())->method('get')->with($classNameHash)->will($this->returnValue(FALSE));
                $mockedCache->expects($this->once())->method('set')->with($classNameHash, $this->anything())->will($this->returnCallback(array($this, 'setClassInfoCacheCallback')));
                $container->getInstance($className);
-               $this->assertInstanceOf('TYPO3\\CMS\\Extbase\\Object\\Container\\ClassInfo', $this->cachedClassInfo);
+               $this->assertInstanceOf(\TYPO3\CMS\Extbase\Object\Container\ClassInfo::class, $this->cachedClassInfo);
                $this->assertEquals($className, $this->cachedClassInfo->getClassName());
        }
 
@@ -303,16 +303,16 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function isSingletonReturnsTrueForSingletonInstancesAndFalseForPrototypes() {
-               $this->assertTrue($this->container->isSingleton('TYPO3\CMS\Extbase\Object\Container\Container'));
-               $this->assertFalse($this->container->isSingleton('TYPO3\CMS\Extbase\Core\Bootstrap'));
+               $this->assertTrue($this->container->isSingleton(\TYPO3\CMS\Extbase\Object\Container\Container::class));
+               $this->assertFalse($this->container->isSingleton(\TYPO3\CMS\Extbase\Core\Bootstrap::class));
        }
 
        /**
         * @test
         */
        public function isPrototypeReturnsFalseForSingletonInstancesAndTrueForPrototypes() {
-               $this->assertFalse($this->container->isPrototype('TYPO3\CMS\Extbase\Object\Container\Container'));
-               $this->assertTrue($this->container->isPrototype('TYPO3\CMS\Extbase\Core\Bootstrap'));
+               $this->assertFalse($this->container->isPrototype(\TYPO3\CMS\Extbase\Object\Container\Container::class));
+               $this->assertTrue($this->container->isPrototype(\TYPO3\CMS\Extbase\Core\Bootstrap::class));
        }
 
        /************************************************
@@ -325,7 +325,7 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceGivesSimpleConstructorArgumentToClassInstance() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\SimpleTypeConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\SimpleTypeConstructorArgument::class,
                        array(TRUE)
                );
                $this->assertTrue($object->foo);
@@ -337,7 +337,7 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceDoesNotInfluenceSimpleTypeConstructorArgumentIfNotGiven() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\SimpleTypeConstructorArgument'
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\SimpleTypeConstructorArgument::class
                );
                $this->assertFalse($object->foo);
        }
@@ -349,11 +349,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceGivesExistingConstructorArgumentToClassInstance() {
                $argumentTestClass = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgument::class,
                        array($argumentTestClass)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgument::class,
                        $object
                );
                $this->assertSame($argumentTestClass, $object->argumentTestClass);
@@ -365,14 +365,14 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceInjectsNewInstanceOfClassToClassIfArgumentIsMandatory() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgument'
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgument::class
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgument::class,
                        $object
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClass
                );
        }
@@ -383,10 +383,10 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceDoesNotInjectAnOptionalArgumentIfNotGiven() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\OptionalConstructorArgument'
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\OptionalConstructorArgument::class
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\OptionalConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\OptionalConstructorArgument::class,
                        $object
                );
                $this->assertNull($object->argumentTestClass);
@@ -398,11 +398,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceDoesNotInjectAnOptionalArgumentIfGivenArgumentIsNull() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\OptionalConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\OptionalConstructorArgument::class,
                        array(NULL)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\OptionalConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\OptionalConstructorArgument::class,
                        $object
                );
                $this->assertNull($object->argumentTestClass);
@@ -415,11 +415,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceGivesExistingConstructorArgumentToClassInstanceIfArgumentIsGiven() {
                $argumentTestClass = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\OptionalConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\OptionalConstructorArgument::class,
                        array($argumentTestClass)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\OptionalConstructorArgument',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\OptionalConstructorArgument::class,
                        $object
                );
                $this->assertSame($argumentTestClass, $object->argumentTestClass);
@@ -433,11 +433,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $firstArgument = new Fixtures\ArgumentTestClass();
                $secondArgument = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class,
                        array($firstArgument, $secondArgument)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class,
                        $object
                );
                $this->assertSame(
@@ -456,18 +456,18 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceInjectsTwoMandatoryArguments() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo'
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class,
                        $object
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClass
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClassTwo
                );
                $this->assertNotSame(
@@ -483,11 +483,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceInjectsSecondMandatoryArgumentIfFirstIsGiven() {
                $firstArgument = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class,
                        array($firstArgument)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class,
                        $object
                );
                $this->assertSame(
@@ -495,7 +495,7 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        $object->argumentTestClass
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClassTwo
                );
                $this->assertNotSame(
@@ -511,19 +511,19 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceInjectsFirstMandatoryArgumentIfSecondIsGiven() {
                $secondArgument = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class,
                        array(NULL, $secondArgument)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\MandatoryConstructorArgumentTwo',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\MandatoryConstructorArgumentTwo::class,
                        $object
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClass
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClassTwo
                );
                $this->assertSame(
@@ -544,11 +544,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $firstArgument = new Fixtures\ArgumentTestClass();
                $secondArgument = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        array($firstArgument, $secondArgument)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        $object
                );
                $this->assertSame(
@@ -567,14 +567,14 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceInjectsFirstMandatoryArgumentIfSecondIsOptionalAndNoneAreGiven() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional'
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        $object
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClass
                );
                $this->assertNull($object->argumentTestClassTwo);
@@ -586,15 +586,15 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceInjectsFirstMandatoryArgumentIfSecondIsOptionalAndBothAreGivenAsNull() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        array(NULL, NULL)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        $object
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClass
                );
                $this->assertNull($object->argumentTestClassTwo);
@@ -607,11 +607,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceGivesFirstArgumentToConstructorIfSecondIsOptionalAndFirstIsGiven() {
                $firstArgument = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        array($firstArgument)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        $object
                );
                $this->assertSame(
@@ -628,11 +628,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceGivesFirstArgumentToConstructorIfSecondIsOptionalFirstIsGivenAndSecondIsGivenNull() {
                $firstArgument = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        array($firstArgument, NULL)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsSecondOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsSecondOptional::class,
                        $object
                );
                $this->assertSame(
@@ -649,15 +649,15 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceOnFirstOptionalAndSecondMandatoryInjectsSecondArgumentIfFirstIsGivenAsNull() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        array(NULL)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        $object
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClassTwo
                );
        }
@@ -670,11 +670,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $first = new Fixtures\ArgumentTestClass();
                $second = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        array($first, $second)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        $object
                );
                $this->assertSame(
@@ -694,11 +694,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceOnFirstOptionalAndSecondMandatoryInjectsSecondArgumentIfFirstIsGiven() {
                $first = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        array($first)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        $object
                );
                $this->assertSame(
@@ -706,7 +706,7 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        $object->argumentTestClass
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClassTwo
                );
                $this->assertNotSame(
@@ -723,11 +723,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceOnFirstOptionalAndSecondMandatoryGivesSecondArgumentAsIsIfFirstIsGivenAsNullAndSecondIsGiven() {
                $second = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        array(NULL, $second)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        $object
                );
                $this->assertSame(
@@ -743,15 +743,15 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceOnFirstOptionalAndSecondMandatoryInjectsSecondArgumentIfFirstIsGivenAsNullAndSecondIsNull() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        array(NULL, NULL)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsFirstOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsFirstOptional::class,
                        $object
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\ArgumentTestClass',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\ArgumentTestClass::class,
                        $object->argumentTestClassTwo
                );
        }
@@ -764,11 +764,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $first = new Fixtures\ArgumentTestClass();
                $second = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        array($first, $second)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        $object
                );
                $this->assertSame(
@@ -787,11 +787,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceOnTwoOptionalGivesNoArgumentsToConstructorIfArgumentsAreNull() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        array(NULL, NULL)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        $object
                );
                $this->assertNull($object->argumentTestClass);
@@ -804,9 +804,9 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getInstanceOnTwoOptionalGivesNoArgumentsToConstructorIfNoneAreGiven() {
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional');
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class);
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        $object
                );
                $this->assertNull($object->argumentTestClass);
@@ -820,11 +820,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceOnTwoOptionalGivesOneArgumentToConstructorIfFirstIsObjectAndSecondIsNotGiven() {
                $first = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        array($first)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        $object
                );
                $this->assertSame(
@@ -841,11 +841,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceOnTwoOptionalGivesOneArgumentToConstructorIfFirstIsObjectAndSecondIsNull() {
                $first = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        array($first, NULL)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        $object
                );
                $this->assertSame(
@@ -862,11 +862,11 @@ class ContainerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getInstanceOnTwoOptionalGivesOneArgumentToConstructorIfFirstIsNullAndSecondIsObject() {
                $second = new Fixtures\ArgumentTestClass();
                $object = $this->container->getInstance(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        array(NULL, $second)
                );
                $this->assertInstanceOf(
-                       'TYPO3\\CMS\\Extbase\\Tests\\Unit\\Object\\Container\\Fixtures\\TwoConstructorArgumentsBothOptional',
+                       \TYPO3\CMS\Extbase\Tests\Unit\Object\Container\Fixtures\TwoConstructorArgumentsBothOptional::class,
                        $object
                );
                $this->assertNull($object->argumentTestClass);
index a1b0cf3..98bc341 100644 (file)
@@ -24,17 +24,17 @@ class BackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function insertRelationInRelationtableSetsMmMatchFieldsInRow() {
                /* \TYPO3\CMS\Extbase\Persistence\Generic\Backend|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $fixture = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend', array('dummy'), array(), '', FALSE);
+               $fixture = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Backend::class, array('dummy'), array(), '', FALSE);
                /* \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper|\PHPUnit_Framework_MockObject_MockObject */
-               $dataMapper = $this->getMock('TYPO3\\CMS\Extbase\\Persistence\\Generic\\Mapper\\DataMapper');
+               $dataMapper = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class);
                /* \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap|\PHPUnit_Framework_MockObject_MockObject */
-               $dataMap = $this->getMock('TYPO3\\CMS\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array(), array(), '', FALSE);
+               $dataMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array(), array(), '', FALSE);
                /* \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap|\PHPUnit_Framework_MockObject_MockObject */
-               $columnMap = $this->getMock('TYPO3\\CMS\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $columnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                /* \TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface|\PHPUnit_Framework_MockObject_MockObject */
-               $storageBackend = $this->getMock('TYPO3\\CMS\Extbase\\Persistence\\Generic\\Storage\\BackendInterface');
+               $storageBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface::class);
                /* \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface|\PHPUnit_Framework_MockObject_MockObject */
-               $domainObject = $this->getMock('TYPO3\\CMS\Extbase\\DomainObject\\DomainObjectInterface');
+               $domainObject = $this->getMock(\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface::class);
 
                $mmMatchFields = array(
                        'identifier' => 'myTable:myField',
@@ -76,14 +76,14 @@ class BackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getIdentifierByObjectReturnsIdentifierForNonlazyObject() {
                $fakeUuid = 'fakeUuid';
-               $configurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $configurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $session = $this->getMock('stdClass', array('getIdentifierByObject'), array(), '', FALSE);
                $object = new \stdClass();
 
                $session->expects($this->once())->method('getIdentifierByObject')->with($object)->will($this->returnValue($fakeUuid));
 
                /** @var \TYPO3\CMS\Extbase\Persistence\Generic\Backend $backend */
-               $backend = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend', array('dummy'), array($configurationManager));
+               $backend = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Backend::class, array('dummy'), array($configurationManager));
                $backend->_set('session', $session);
 
                $this->assertEquals($backend->getIdentifierByObject($object), $fakeUuid);
@@ -94,9 +94,9 @@ class BackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getIdentifierByObjectReturnsIdentifierForLazyObject() {
                $fakeUuid = 'fakeUuid';
-               $configurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
+               $configurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
                $parentObject = new \stdClass();
-               $proxy = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy', array('_loadRealInstance'), array($parentObject, 'y', 'z'), '', FALSE);
+               $proxy = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::class, array('_loadRealInstance'), array($parentObject, 'y', 'z'), '', FALSE);
                $session = $this->getMock('stdClass', array('getIdentifierByObject'), array(), '', FALSE);
                $object = new \stdClass();
 
@@ -104,7 +104,7 @@ class BackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $session->expects($this->once())->method('getIdentifierByObject')->with($object)->will($this->returnValue($fakeUuid));
 
                /** @var \TYPO3\CMS\Extbase\Persistence\Generic\Backend $backend */
-               $backend = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend', array('dummy'), array($configurationManager));
+               $backend = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Backend::class, array('dummy'), array($configurationManager));
                $backend->_set('session', $session);
 
                $this->assertEquals($backend->getIdentifierByObject($proxy), $fakeUuid);
index e719c2b..ab50bd7 100644 (file)
@@ -29,7 +29,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function oneToOneRelation() {
                return array(
                        array('Tx_Myext_Domain_Model_Foo'),
-                       array('TYPO3\\CMS\\Extbase\\Domain\\Model\\FrontendUser')
+                       array(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser::class)
                );
        }
 
@@ -38,7 +38,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider oneToOneRelation
         */
        public function setRelationsDetectsOneToOneRelation($className) {
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $columnConfiguration = array(
                        'type' => 'select',
                        'foreign_table' => 'tx_myextension_bar',
@@ -48,7 +48,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'type' => $className,
                        'elementType' => NULL
                );
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->once())->method('setOneToOneRelation')->will($this->returnValue($mockColumnMap));
                $mockDataMapFactory->expects($this->never())->method('setOneToManyRelation');
                $mockDataMapFactory->expects($this->never())->method('setManyToManyRelation');
@@ -59,7 +59,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function settingOneToOneRelationSetsRelationTableMatchFields() {
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $matchFields = array(
                                'fieldname' => 'foo_model'
                        );
@@ -73,7 +73,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockColumnMap->expects($this->once())
                        ->method('setRelationTableMatchFields')
                        ->with($matchFields);
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('dummy'), array(), '', FALSE);
                $mockDataMapFactory->_call('setOneToOneRelation', $mockColumnMap, $columnConfiguration);
        }
 
@@ -81,7 +81,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function settingOneToManyRelationSetsRelationTableMatchFields() {
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $matchFields = array(
                                'fieldname' => 'foo_model'
                        );
@@ -95,7 +95,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockColumnMap->expects($this->once())
                        ->method('setRelationTableMatchFields')
                        ->with($matchFields);
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('dummy'), array(), '', FALSE);
                $mockDataMapFactory->_call('setOneToManyRelation', $mockColumnMap, $columnConfiguration);
        }
 
@@ -103,7 +103,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setRelationsDetectsOneToOneRelationWithIntermediateTable() {
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $columnConfiguration = array(
                        'type' => 'select',
                        'foreign_table' => 'tx_myextension_bar',
@@ -113,7 +113,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'type' => 'Tx_Myext_Domain_Model_Foo',
                        'elementType' => NULL
                );
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->never())->method('setOneToOneRelation');
                $mockDataMapFactory->expects($this->never())->method('setOneToManyRelation');
                $mockDataMapFactory->expects($this->once())->method('setManyToManyRelation')->will($this->returnValue($mockColumnMap));
@@ -124,7 +124,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setRelationsDetectsOneToManyRelation() {
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $columnConfiguration = array(
                        'type' => 'select',
                        'foreign_table' => 'tx_myextension_bar',
@@ -132,10 +132,10 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'foreign_table_field' => 'parenttable'
                );
                $propertyMetaData = array(
-                       'type' => 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage',
+                       'type' => \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class,
                        'elementType' => 'Tx_Myext_Domain_Model_Foo'
                );
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->never())->method('setOneToOneRelation');
                $mockDataMapFactory->expects($this->once())->method('setOneToManyRelation')->will($this->returnValue($mockColumnMap));
                $mockDataMapFactory->expects($this->never())->method('setManyToManyRelation');
@@ -146,17 +146,17 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setRelationsDetectsManyToManyRelationOfTypeSelect() {
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $columnConfiguration = array(
                        'type' => 'select',
                        'foreign_table' => 'tx_myextension_bar',
                        'MM' => 'tx_myextension_mm'
                );
                $propertyMetaData = array(
-                       'type' => 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage',
+                       'type' => \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class,
                        'elementType' => 'Tx_Myext_Domain_Model_Foo'
                );
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->never())->method('setOneToOneRelation');
                $mockDataMapFactory->expects($this->never())->method('setOneToManyRelation');
                $mockDataMapFactory->expects($this->once())->method('setManyToManyRelation')->will($this->returnValue($mockColumnMap));
@@ -167,17 +167,17 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function setRelationsDetectsManyToManyRelationOfTypeInlineWithIntermediateTable() {
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $columnConfiguration = array(
                        'type' => 'inline',
                        'foreign_table' => 'tx_myextension_righttable',
                        'MM' => 'tx_myextension_mm'
                );
                $propertyMetaData = array(
-                       'type' => 'TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage',
+                       'type' => \TYPO3\CMS\Extbase\Persistence\ObjectStorage::class,
                        'elementType' => 'Tx_Myext_Domain_Model_Foo'
                );
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('setOneToOneRelation', 'setOneToManyRelation', 'setManyToManyRelation'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->never())->method('setOneToOneRelation');
                $mockDataMapFactory->expects($this->never())->method('setOneToManyRelation');
                $mockDataMapFactory->expects($this->once())->method('setManyToManyRelation')->will($this->returnValue($mockColumnMap));
@@ -197,7 +197,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'MM_table_where' => 'WHERE 2=2'
                        )
                );
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $mockColumnMap->expects($this->once())->method('setTypeOfRelation')->with($this->equalTo(ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
                $mockColumnMap->expects($this->once())->method('setRelationTableName')->with($this->equalTo('tx_myextension_mm'));
                $mockColumnMap->expects($this->once())->method('setChildTableName')->with($this->equalTo('tx_myextension_righttable'));
@@ -207,7 +207,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockColumnMap->expects($this->never())->method('setParentTableFieldName');
                $mockColumnMap->expects($this->never())->method('setRelationTableMatchFields');
                $mockColumnMap->expects($this->never())->method('setRelationTableInsertFields');
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('dummy'), array(), '', FALSE);
                $mockDataMapFactory->_callRef('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
        }
 
@@ -224,7 +224,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                );
                $leftColumnsDefinition['rights']['MM_opposite_field'] = 'opposite_field';
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $mockColumnMap->expects($this->once())->method('setTypeOfRelation')->with($this->equalTo(ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
                $mockColumnMap->expects($this->once())->method('setRelationTableName')->with($this->equalTo('tx_myextension_mm'));
                $mockColumnMap->expects($this->once())->method('setChildTableName')->with($this->equalTo('tx_myextension_lefttable'));
@@ -234,7 +234,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockColumnMap->expects($this->never())->method('setParentTableFieldName');
                $mockColumnMap->expects($this->never())->method('setRelationTableMatchFields');
                $mockColumnMap->expects($this->never())->method('setRelationTableInsertFields');
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('dummy'), array(), '', FALSE);
                $mockDataMapFactory->_callRef('setManyToManyRelation', $mockColumnMap, $rightColumnsDefinition['lefts']);
        }
 
@@ -250,7 +250,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'foreign_sortby' => 'sorting'
                        )
                );
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $mockColumnMap->expects($this->once())->method('setTypeOfRelation')->with($this->equalTo(ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY));
                $mockColumnMap->expects($this->once())->method('setRelationTableName')->with($this->equalTo('tx_myextension_mm'));
                $mockColumnMap->expects($this->once())->method('setChildTableName')->with($this->equalTo('tx_myextension_righttable'));
@@ -260,7 +260,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockColumnMap->expects($this->never())->method('setParentTableFieldName');
                $mockColumnMap->expects($this->never())->method('setRelationTableMatchFields');
                $mockColumnMap->expects($this->never())->method('setRelationTableInsertFields');
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('getColumnsDefinition'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('getColumnsDefinition'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->never())->method('getColumnsDefinition');
                $mockDataMapFactory->_callRef('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
        }
@@ -277,11 +277,11 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'MM' => 'tx_myextension_mm'
                        )
                );
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $mockColumnMap->expects($this->once())->method('setRelationTableName')->with($this->equalTo('tx_myextension_mm'));
                $mockColumnMap->expects($this->once())->method('getRelationTableName')->will($this->returnValue('tx_myextension_mm'));
                $mockColumnMap->expects($this->never())->method('setrelationTablePageIdColumnName');
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('getControlSection'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('getControlSection'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->once())->method('getControlSection')->with($this->equalTo('tx_myextension_mm'))->will($this->returnValue(NULL));
                $mockDataMapFactory->_callRef('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
        }
@@ -298,11 +298,11 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'MM' => 'tx_myextension_mm'
                        )
                );
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array(), '', FALSE);
                $mockColumnMap->expects($this->once())->method('setRelationTableName')->with($this->equalTo('tx_myextension_mm'));
                $mockColumnMap->expects($this->once())->method('getRelationTableName')->will($this->returnValue('tx_myextension_mm'));
                $mockColumnMap->expects($this->once())->method('setrelationTablePageIdColumnName')->with($this->equalTo('pid'));
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('getControlSection'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('getControlSection'), array(), '', FALSE);
                $mockDataMapFactory->expects($this->once())->method('getControlSection')->with($this->equalTo('tx_myextension_mm'))->will($this->returnValue(array('ctrl' => array('foo' => 'bar'))));
                $mockDataMapFactory->_callRef('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
        }
@@ -331,7 +331,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'eval' => $type,
                );
 
-               $mockColumnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array('setDateTimeStorageFormat'), array(), '', FALSE);
+               $mockColumnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array('setDateTimeStorageFormat'), array(), '', FALSE);
 
                if ($expectedValue !== NULL) {
                        $mockColumnMap->expects($this->once())->method('setDateTimeStorageFormat')->with($this->equalTo($type));
@@ -339,7 +339,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        $mockColumnMap->expects($this->never())->method('setDateTimeStorageFormat');
                }
 
-               $accessibleClassName = $this->buildAccessibleProxy('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory');
+               $accessibleClassName = $this->buildAccessibleProxy(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class);
                $accessibleDataMapFactory = new $accessibleClassName();
                $accessibleDataMapFactory->_callRef('setFieldEvaluations', $mockColumnMap, $columnDefinition);
        }
@@ -349,8 +349,8 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidClassException
         */
        public function buildDataMapThrowsExceptionIfClassNameIsNotKnown() {
-               $mockDataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('getControlSection'), array(), '', FALSE);
-               $cacheMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', array('get'), array(), '', FALSE);
+               $mockDataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('getControlSection'), array(), '', FALSE);
+               $cacheMock = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, array('get'), array(), '', FALSE);
                $cacheMock->expects($this->any())->method('get')->will($this->returnValue(FALSE));
                $mockDataMapFactory->_set('dataMapCache', $cacheMock);
                $mockDataMapFactory->buildDataMap('UnknownObject');
@@ -364,7 +364,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $configuration = array(
                        'persistence' => array(
                                'classes' => array(
-                                       'TYPO3\\CMS\\Extbase\\Domain\\Model\\FrontendUser' => array(
+                                       \TYPO3\CMS\Extbase\Domain\Model\FrontendUser::class => array(
                                                'subclasses' => array(
                                                        'Tx_SampleExt_Domain_Model_LevelOne1' => 'Tx_SampleExt_Domain_Model_LevelOne1',
                                                        'Tx_SampleExt_Domain_Model_LevelOne2' => 'Tx_SampleExt_Domain_Model_LevelOne2'
@@ -390,20 +390,20 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
 
                /** @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject $objectManager */
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', array('dummy'), array(), '', FALSE);
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class, array('dummy'), array(), '', FALSE);
 
                /** @var $configurationManager \TYPO3\CMS\Extbase\Configuration\ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject */
-               $configurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
+               $configurationManager = $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class);
                $configurationManager->expects($this->once())->method('getConfiguration')->with('Framework')->will($this->returnValue($configuration));
                /** @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory $dataMapFactory */
-               $dataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('test'));
+               $dataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('test'));
                $dataMapFactory->_set('reflectionService', new \TYPO3\CMS\Extbase\Reflection\ReflectionService());
                $dataMapFactory->_set('objectManager', $objectManager);
                $dataMapFactory->_set('configurationManager', $configurationManager);
-               $cacheMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', array(), array(), '', FALSE);
+               $cacheMock = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, array(), array(), '', FALSE);
                $cacheMock->expects($this->any())->method('get')->will($this->returnValue(FALSE));
                $dataMapFactory->_set('dataMapCache', $cacheMock);
-               $dataMap = $dataMapFactory->buildDataMap('TYPO3\\CMS\\Extbase\\Domain\\Model\\FrontendUser');
+               $dataMap = $dataMapFactory->buildDataMap(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser::class);
                $this->assertSame($expectedSubclasses, $dataMap->getSubclasses());
        }
 
@@ -412,7 +412,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function classNameTableNameMappings() {
                return array(
-                       'Core classes' => array('TYPO3\\CMS\\Belog\\Domain\\Model\\LogEntry', 'tx_belog_domain_model_logentry'),
+                       'Core classes' => array(\TYPO3\CMS\Belog\Domain\Model\LogEntry::class, 'tx_belog_domain_model_logentry'),
                        'Core classes with namespaces and leading backslash' => array('\\TYPO3\\CMS\\Belog\\Domain\\Model\\LogEntry', 'tx_belog_domain_model_logentry'),
                        'Extension classes' => array('ExtbaseTeam\\BlogExample\\Domain\\Model\\Blog', 'tx_blogexample_domain_model_blog'),
                        'Extension classes with namespaces and leading backslash' => array('\\ExtbaseTeam\\BlogExample\\Domain\\Model\\Blog', 'tx_blogexample_domain_model_blog'),
@@ -426,7 +426,7 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider classNameTableNameMappings
         */
        public function resolveTableNameReturnsExpectedTablenames($className, $expected) {
-               $dataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'));
+               $dataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('dummy'));
                $this->assertSame($expected, $dataMapFactory->_call('resolveTableName', $className));
        }
 
@@ -435,11 +435,11 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function createColumnMapReturnsAValidColumnMap() {
                /** @var $dataMapFactory \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory */
-               $dataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'));
+               $dataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('dummy'));
 
                /** @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject $objectManager */
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
-               $columnMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\ColumnMap', array(), array('column', 'property'));
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+               $columnMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array(), array('column', 'property'));
                $objectManager->expects($this->once())->method('get')->will($this->returnValue($columnMap));
 
                $dataMapFactory->_set('objectManager', $objectManager);
@@ -482,10 +482,10 @@ class DataMapFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setTypeDetectsTypeAndInternalTypeProperly(array $columnConfiguration, $type, $internalType) {
                /** @var $dataMapFactory \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory | AccessibleObjectInterface */
-               $dataMapFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory', array('dummy'));
+               $dataMapFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class, array('dummy'));
 
                /** @var ColumnMap $columnMap */
-               $columnMap = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap', array('dummy'), array(), '', FALSE);
+               $columnMap = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::class, array('dummy'), array(), '', FALSE);
 
                $dataMapFactory->_call('setType', $columnMap, $columnConfiguration);
 
index 6039c8a..b3afb86 100644 (file)
@@ -29,9 +29,9 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $rows = array(array('uid' => '1234'));
                $object = new \stdClass();
                /** @var DataMapper|AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject $dataMapper */
-               $dataMapper = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('mapSingleRow', 'getTargetType'));
+               $dataMapper = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('mapSingleRow', 'getTargetType'));
                $dataMapper->expects($this->any())->method('getTargetType')->will($this->returnArgument(1));
-               $dataMapFactory = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory');
+               $dataMapFactory = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::class);
                $dataMapper->_set('dataMapFactory', $dataMapFactory);
                $dataMapper->expects($this->once())->method('mapSingleRow')->with($rows[0])->will($this->returnValue($object));
                $dataMapper->map(get_class($object), $rows);
@@ -43,10 +43,10 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function mapSingleRowReturnsObjectFromIdentityMapIfAvailable() {
                $row = array('uid' => '1234');
                $object = new \stdClass();
-               $identityMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\IdentityMap');
+               $identityMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\IdentityMap::class);
                $identityMap->expects($this->once())->method('hasIdentifier')->with('1234')->will($this->returnValue(TRUE));
                $identityMap->expects($this->once())->method('getObjectByIdentifier')->with('1234')->will($this->returnValue($object));
-               $dataMapper = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('dummy'));
+               $dataMapper = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('dummy'));
                $dataMapper->_set('identityMap', $identityMap);
                $dataMapper->_call('mapSingleRow', get_class($object), $row);
        }
@@ -57,7 +57,7 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function thawPropertiesSetsPropertyValues() {
                $className = 'Class' . md5(uniqid(mt_rand(), TRUE));
                $classNameWithNS = __NAMESPACE__ . '\\' . $className;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                 public $firstProperty; public $secondProperty; public $thirdProperty; public $fourthProperty;
                 }'
                );
@@ -76,22 +76,22 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'secondProperty' => new ColumnMap('secondProperty', 'secondProperty'),
                        'thirdProperty' => new ColumnMap('thirdProperty', 'thirdProperty')
                );
-               $dataMap = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array('dummy'), array($className, $className));
+               $dataMap = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array('dummy'), array($className, $className));
                $dataMap->_set('columnMaps', $columnMaps);
                $dataMaps = array(
                        $classNameWithNS => $dataMap
                );
                /** @var AccessibleObjectInterface|\TYPO3\CMS\Extbase\Reflection\ClassSchema $classSchema */
-               $classSchema = $this->getAccessibleMock('TYPO3\CMS\Extbase\Reflection\ClassSchema', array('dummy'), array($classNameWithNS));
+               $classSchema = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Reflection\ClassSchema::class, array('dummy'), array($classNameWithNS));
                $classSchema->addProperty('pid', 'integer');
                $classSchema->addProperty('uid', 'integer');
                $classSchema->addProperty('firstProperty', 'string');
                $classSchema->addProperty('secondProperty', 'integer');
                $classSchema->addProperty('thirdProperty', 'float');
                $classSchema->addProperty('fourthProperty', 'boolean');
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array('getClassSchema'));
+               $mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class, array('getClassSchema'));
                $mockReflectionService->expects($this->any())->method('getClassSchema')->will($this->returnValue($classSchema));
-               $dataMapper = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('dummy'));
+               $dataMapper = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('dummy'));
                $dataMapper->_set('dataMaps', $dataMaps);
                $dataMapper->_set('reflectionService', $mockReflectionService);
                $dataMapper->_call('thawProperties', $object, $row);
@@ -109,11 +109,11 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function fetchRelatedEagerReturnsNullForEmptyRelationHasOne() {
                $columnMap = new ColumnMap('columnName', 'propertyName');
                $columnMap->setTypeOfRelation(ColumnMap::RELATION_HAS_ONE);
-               $dataMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array('getColumnMap'), array(), '', FALSE);
+               $dataMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array('getColumnMap'), array(), '', FALSE);
                $dataMap->expects($this->any())->method('getColumnMap')->will($this->returnValue($columnMap));
-               $dataMapper = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('getDataMap'));
+               $dataMapper = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('getDataMap'));
                $dataMapper->expects($this->any())->method('getDataMap')->will($this->returnValue($dataMap));
-               $result = $dataMapper->_call('fetchRelatedEager', $this->getMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity'), 'SomeName', '');
+               $result = $dataMapper->_call('fetchRelatedEager', $this->getMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class), 'SomeName', '');
                $this->assertEquals(NULL, $result);
        }
 
@@ -125,11 +125,11 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne() {
                $columnMap = new ColumnMap('columnName', 'propertyName');
                $columnMap->setTypeOfRelation(ColumnMap::RELATION_BELONGS_TO_MANY);
-               $dataMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array('getColumnMap'), array(), '', FALSE);
+               $dataMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array('getColumnMap'), array(), '', FALSE);
                $dataMap->expects($this->any())->method('getColumnMap')->will($this->returnValue($columnMap));
-               $dataMapper = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('getDataMap'));
+               $dataMapper = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('getDataMap'));
                $dataMapper->expects($this->any())->method('getDataMap')->will($this->returnValue($dataMap));
-               $result = $dataMapper->_call('fetchRelatedEager', $this->getMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity'), 'SomeName', '');
+               $result = $dataMapper->_call('fetchRelatedEager', $this->getMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class), 'SomeName', '');
                $this->assertEquals(array(), $result);
        }
 
@@ -142,12 +142,12 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function mapObjectToClassPropertyReturnsNullForEmptyRelationHasOne() {
                $columnMap = new ColumnMap('columnName', 'propertyName');
                $columnMap->setTypeOfRelation(ColumnMap::RELATION_HAS_ONE);
-               $dataMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array('getColumnMap'), array(), '', FALSE);
+               $dataMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array('getColumnMap'), array(), '', FALSE);
                $dataMap->expects($this->any())->method('getColumnMap')->will($this->returnValue($columnMap));
-               $dataMapper = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('getDataMap', 'fetchRelated'));
+               $dataMapper = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('getDataMap', 'fetchRelated'));
                $dataMapper->expects($this->any())->method('getDataMap')->will($this->returnValue($dataMap));
                $dataMapper->expects($this->never())->method('fetchRelated');
-               $result = $dataMapper->_call('mapObjectToClassProperty', $this->getMock('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity'), 'SomeName', '');
+               $result = $dataMapper->_call('mapObjectToClassProperty', $this->getMock(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class), 'SomeName', '');
                $this->assertEquals(NULL, $result);
        }
 
@@ -161,32 +161,32 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function mapObjectToClassPropertyReturnsExistingObjectWithoutCallingFetchRelated() {
                $columnMap = new ColumnMap('columnName', 'propertyName');
                $columnMap->setTypeOfRelation(ColumnMap::RELATION_HAS_ONE);
-               $dataMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array('getColumnMap'), array(), '', FALSE);
+               $dataMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array('getColumnMap'), array(), '', FALSE);
 
                $className = 'Class1' . md5(uniqid(mt_rand(), TRUE));
                $classNameWithNS = __NAMESPACE__ . '\\' . $className;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity { public $relationProperty; }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' { public $relationProperty; }');
                $object = new $classNameWithNS();
 
                $className2 = 'Class2' . md5(uniqid(mt_rand(), TRUE));
                $className2WithNS = __NAMESPACE__ . '\\' . $className2;
-               eval('namespace ' . __NAMESPACE__ . '; class ' . $className2 . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity { }');
+               eval('namespace ' . __NAMESPACE__ . '; class ' . $className2 . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' { }');
                $child = new $className2WithNS();
-               $classSchema2 = $this->getAccessibleMock('TYPO3\CMS\Extbase\Reflection\ClassSchema', array('dummy'), array($className2WithNS));
+               $classSchema2 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Reflection\ClassSchema::class, array('dummy'), array($className2WithNS));
 
                /** @var \TYPO3\CMS\Extbase\Reflection\ClassSchema|AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject $classSchema1 */
-               $classSchema1 = $this->getAccessibleMock('TYPO3\CMS\Extbase\Reflection\ClassSchema', array('dummy'), array($classNameWithNS));
+               $classSchema1 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Reflection\ClassSchema::class, array('dummy'), array($classNameWithNS));
                $classSchema1->addProperty('relationProperty', $className2WithNS);
                $identifier = 1;
 
                $session = new \TYPO3\CMS\Extbase\Persistence\Generic\Session();
                $session->registerObject($child, $identifier);
 
-               $mockReflectionService = $this->getMock('\TYPO3\CMS\Extbase\Reflection\ReflectionService', array('getClassSchema'), array(), '', FALSE);
+               $mockReflectionService = $this->getMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class, array('getClassSchema'), array(), '', FALSE);
                $mockReflectionService->expects($this->any())->method('getClassSchema')->will($this->returnValue($classSchema1));
 
                $dataMap->expects($this->any())->method('getColumnMap')->will($this->returnValue($columnMap));
-               $dataMapper = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('getDataMap', 'getNonEmptyRelationValue'));
+               $dataMapper = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('getDataMap', 'getNonEmptyRelationValue'));
                $dataMapper->_set('reflectionService', $mockReflectionService);
                $dataMapper->_set('persistenceSession', $session);
                $dataMapper->expects($this->any())->method('getDataMap')->will($this->returnValue($dataMap));
@@ -222,7 +222,7 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider mapDateTimeHandlesDifferentFieldEvaluationsDataProvider
         */
        public function mapDateTimeHandlesDifferentFieldEvaluations($value, $storageFormat, $expectedValue) {
-               $accessibleClassName = $this->buildAccessibleProxy('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper');
+               $accessibleClassName = $this->buildAccessibleProxy(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class);
 
                /** @var DataMapper|AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject $accessibleDataMapFactory */
                $accessibleDataMapFactory = new $accessibleClassName();
@@ -282,7 +282,7 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getPlainValueCallsGetRealInstanceOnInputIfInputIsInstanceOfLazyLoadingProxy() {
                $dataMapper = new DataMapper();
                $input = $this->getMock(
-                       'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyLoadingProxy',
+                       \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy::class,
                        array(),
                        array(),
                        '',
@@ -298,7 +298,7 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getPlainValueCallsGetUidOnDomainObjectInterfaceInput() {
                $dataMapper = new DataMapper();
                $input = $this->getMock(
-                       'TYPO3\\CMS\\Extbase\\DomainObject\\DomainObjectInterface',
+                       \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface::class,
                        array(),
                        array(),
                        '',
index 4879a69..8f9715a 100644 (file)
@@ -25,7 +25,7 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $mockObjectManager;
 
        public function setUp() {
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
        }
 
        /**
@@ -35,10 +35,10 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $entity2 = new \TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Model\Entity2();
                $objectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
                $objectStorage->attach($entity2);
-               $mockBackend = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface');
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
                $mockBackend->expects($this->once())->method('setAggregateRootObjects')->with($objectStorage);
 
-               $manager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $manager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $manager->_set('backend', $mockBackend);
                $manager->add($entity2);
 
@@ -52,10 +52,10 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $entity2 = new \TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Model\Entity2();
                $objectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
                $objectStorage->attach($entity2);
-               $mockBackend = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface');
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
                $mockBackend->expects($this->once())->method('setDeletedEntities')->with($objectStorage);
 
-               $manager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $manager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $manager->_set('backend', $mockBackend);
                $manager->remove($entity2);
 
@@ -69,11 +69,11 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $fakeUuid = 'fakeUuid';
                $object = new \stdClass();
 
-               $mockBackend = $this->getMock('TYPO3\\CMS\Extbase\\Persistence\\Generic\\BackendInterface');
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
                $mockBackend->expects($this->once())->method('getIdentifierByObject')->with($object)->will($this->returnValue($fakeUuid));
 
                /** @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $manager */
-               $manager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $manager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $manager->_set('backend', $mockBackend);
 
 
@@ -87,11 +87,11 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $fakeUuid = 'fakeUuid';
                $object = new \stdClass();
 
-               $mockSession = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\Session');
+               $mockSession = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Session::class);
                $mockSession->expects($this->once())->method('hasIdentifier')->with($fakeUuid)->will($this->returnValue(TRUE));
                $mockSession->expects($this->once())->method('getObjectByIdentifier')->with($fakeUuid)->will($this->returnValue($object));
 
-               $manager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $manager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $manager->_set('persistenceSession', $mockSession);
 
                $this->assertEquals($manager->getObjectByIdentifier($fakeUuid), $object);
@@ -105,13 +105,13 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $object = new \stdClass();
                $fakeEntityType = get_class($object);
 
-               $mockSession = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\Session');
+               $mockSession = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Session::class);
                $mockSession->expects($this->once())->method('hasIdentifier')->with($fakeUuid)->will($this->returnValue(FALSE));
 
-               $mockBackend = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface');
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
                $mockBackend->expects($this->once())->method('getObjectByIdentifier')->with($fakeUuid, $fakeEntityType)->will($this->returnValue($object));
 
-               $manager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $manager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $manager->_set('persistenceSession', $mockSession);
                $manager->_set('backend', $mockBackend);
 
@@ -125,13 +125,13 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $fakeUuid = '42';
                $fakeEntityType = 'foobar';
 
-               $mockSession = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\Session');
+               $mockSession = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Session::class);
                $mockSession->expects($this->once())->method('hasIdentifier')->with($fakeUuid, $fakeEntityType)->will($this->returnValue(FALSE));
 
-               $mockBackend = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface');
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
                $mockBackend->expects($this->once())->method('getObjectByIdentifier')->with($fakeUuid, $fakeEntityType)->will($this->returnValue(NULL));
 
-               $manager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $manager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $manager->_set('persistenceSession', $mockSession);
                $manager->_set('backend', $mockBackend);
 
@@ -213,7 +213,7 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $className = uniqid('BazFixture');
                eval ('
                        namespace ' . __NAMESPACE__ . '\\Domain\\Model;
-                       class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {
+                       class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {
                                protected $uid = 42;
                        }
                ');
@@ -224,13 +224,13 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $classNameWithNamespace = __NAMESPACE__ . '\\Domain\\Model\\' . $className;
                $repositorClassNameWithNamespace = __NAMESPACE__ . '\\Domain\\Repository\\' . $className . 'Repository';
 
-               $persistenceManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $persistenceManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $session = new \TYPO3\CMS\Extbase\Persistence\Generic\Session();
                $changedEntities = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
                $entity1 = new $classNameWithNamespace();
                $repository = $this->getAccessibleMock($repositorClassNameWithNamespace, array('dummy'), array($this->mockObjectManager));
                $repository->_set('objectType', get_class($entity1));
-               $mockBackend = $this->getMock($this->buildAccessibleProxy('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend'), array('commit', 'setChangedEntities'), array(), '', FALSE);
+               $mockBackend = $this->getMock($this->buildAccessibleProxy(\TYPO3\CMS\Extbase\Persistence\Generic\Backend::class), array('commit', 'setChangedEntities'), array(), '', FALSE);
                $mockBackend->expects($this->once())
                        ->method('setChangedEntities')
                        ->with($this->equalTo($changedEntities));
@@ -253,12 +253,12 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockObject = $this->getMock('TYPO3\CMS\Extbase\Persistence\Aspect\PersistenceMagicInterface');
                $mockObject->Persistence_Object_Identifier = 'abcdefg';
 
-               $mockSession = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\Session');
+               $mockSession = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Session::class);
                $mockSession->expects($this->any())->method('hasIdentifier')->will($this->returnValue(FALSE));
-               $mockBackend = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface');
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
                $mockBackend->expects($this->any())->method('getObjectDataByIdentifier')->will($this->returnValue(FALSE));
 
-               $persistenceManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $persistenceManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $persistenceManager->_set('persistenceSession', $mockSession);
                $persistenceManager->_set('backend', $mockBackend);
 
@@ -273,10 +273,10 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function tearDownWithBackendNotSupportingTearDownDoesNothing() {
-               $mockBackend = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface');
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
                $mockBackend->expects($this->never())->method('tearDown');
 
-               $persistenceManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $persistenceManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $persistenceManager->_set('backend', $mockBackend);
 
                $persistenceManager->tearDown();
@@ -286,11 +286,11 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function tearDownWithBackendSupportingTearDownDelegatesCallToBackend() {
-               $methods = array_merge(get_class_methods('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface'), array('tearDown'));
-               $mockBackend = $this->getMock('TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface', $methods);
+               $methods = array_merge(get_class_methods(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class), array('tearDown'));
+               $mockBackend = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class, $methods);
                $mockBackend->expects($this->once())->method('tearDown');
 
-               $persistenceManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $persistenceManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $persistenceManager->_set('backend', $mockBackend);
 
                $persistenceManager->tearDown();
@@ -306,17 +306,17 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function persistAllAddsReconstitutedObjectFromSessionToBackendsAggregateRootObjects() {
                $className = uniqid('BazFixture');
                eval ('
-                       class Foo_Bar_Domain_Model_' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {}
+                       class Foo_Bar_Domain_Model_' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {}
                ');
                eval ('
                        class Foo_Bar_Domain_Repository_' . $className . 'Repository {}
                ');
-               $persistenceManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $persistenceManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $aggregateRootObjects = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
                $fullClassName = 'Foo_Bar_Domain_Model_' . $className;
                $entity1 = new $fullClassName();
                $aggregateRootObjects->attach($entity1);
-               $mockBackend = $this->getMock($this->buildAccessibleProxy('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend'), array('commit', 'setAggregateRootObjects', 'setDeletedEntities'), array(), '', FALSE);
+               $mockBackend = $this->getMock($this->buildAccessibleProxy(\TYPO3\CMS\Extbase\Persistence\Generic\Backend::class), array('commit', 'setAggregateRootObjects', 'setDeletedEntities'), array(), '', FALSE);
                $mockBackend->expects($this->once())
                        ->method('setAggregateRootObjects')
                        ->with($this->equalTo($aggregateRootObjects));
@@ -332,18 +332,18 @@ class PersistenceManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $className = uniqid('BazFixture');
                eval ('
                        namespace ' . __NAMESPACE__ . '\\Domain\\Model;
-                       class ' . $className . ' extends \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity {}
+                       class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' {}
                ');
                eval ('
                        namespace ' . __NAMESPACE__ . '\\Domain\\Repository;
                        class  ' . $className . 'Repository {}
                ');
-               $persistenceManager = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager', array('dummy'));
+               $persistenceManager = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class, array('dummy'));
                $aggregateRootObjects = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
                $classNameWithNamespace = __NAMESPACE__ . '\\Domain\\Model\\' . $className;
                $entity1 = new $classNameWithNamespace();
                $aggregateRootObjects->attach($entity1);
-               $mockBackend = $this->getMock($this->buildAccessibleProxy('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend'), array('commit', 'setAggregateRootObjects', 'setDeletedEntities'), array(), '', FALSE);
+               $mockBackend = $this->getMock($this->buildAccessibleProxy(\TYPO3\CMS\Extbase\Persistence\Generic\Backend::class), array('commit', 'setAggregateRootObjects', 'setDeletedEntities'), array(), '', FALSE);
                $mockBackend->expects($this->once())
                        ->method('setAggregateRootObjects')
                        ->with($this->equalTo($aggregateRootObjects));
index e89e5e6..44a728b 100644 (file)
@@ -40,14 +40,14 @@ class QueryFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $dataMap;
 
        protected function setUp() {
-               $this->dataMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array('getIsStatic', 'getRootLevel'), array('Vendor\\Ext\\Domain\\Model\\ClubMate', 'tx_ext_domain_model_clubmate'));
+               $this->dataMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array('getIsStatic', 'getRootLevel'), array('Vendor\\Ext\\Domain\\Model\\ClubMate', 'tx_ext_domain_model_clubmate'));
 
-               $this->queryFactory = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory', array('dummy'));
+               $this->queryFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory::class, array('dummy'));
                $this->queryFactory->_set('configurationManager',
-                       $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface')
+                       $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class)
                );
 
-               $this->dataMapper = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('getDataMap', 'convertClassNameToTableName'));
+               $this->dataMapper = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('getDataMap', 'convertClassNameToTableName'));
                $this->dataMapper->expects($this->any())->method('getDataMap')->will($this->returnValue($this->dataMap));
         &nbs