[TASK] Use name-resolution instead of strings where possible: 6 60/34860/3
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Dec 2014 12:51:27 +0000 (13:51 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Fri, 5 Dec 2014 15:47:17 +0000 (16:47 +0100)
(part for EXT:extensionmanager)

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: I440a73b27b71ce4f52daf8f06529370da6e7b74d
Resolves: #63477
Releases: master
Reviewed-on: http://review.typo3.org/34860
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
21 files changed:
typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/ExtensionListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/MirrorListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/XmlParserFactory.php
typo3/sysext/extensionmanager/Tests/Unit/Controller/DownloadControllerTest.php
typo3/sysext/extensionmanager/Tests/Unit/Controller/UpdateFromTerControllerTest.php
typo3/sysext/extensionmanager/Tests/Unit/Controller/UploadExtensionFileControllerTest.php
typo3/sysext/extensionmanager/Tests/Unit/Domain/Model/DownloadQueueTest.php
typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ConfigurationItemRepositoryTest.php
typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/RepositoryRepositoryTest.php
typo3/sysext/extensionmanager/Tests/Unit/Report/ExtensionStatusTest.php
typo3/sysext/extensionmanager/Tests/Unit/Service/ExtensionManagementServiceTest.php
typo3/sysext/extensionmanager/Tests/Unit/Task/UpdateExtensionListTaskTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/ConfigurationUtilityTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/ExtensionModelUtilityTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/InstallUtilityTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/ListUtilityTest.php
typo3/sysext/extensionmanager/ext_localconf.php
typo3/sysext/extensionmanager/ext_tables.php

index 9ddbdf9..a0b9bcc 100644 (file)
@@ -158,7 +158,7 @@ class ExtensionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
                                AND current_version = 1 AND review_state >= 0';
                $order = 'position DESC';
                $result = $this->databaseConnection->exec_SELECTgetRows($select, self::TABLE_NAME, $where, '', $order);
-               return $this->dataMapper->map('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', $result);
+               return $this->dataMapper->map(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, $result);
        }
 
        /**
index f11fcdc..4c4d640 100644 (file)
@@ -200,7 +200,7 @@ class ExtensionListUtility implements \SplObserver {
         * @return void
         */
        public function update(\SplSubject $subject) {
-               if (is_subclass_of($subject, 'TYPO3\\CMS\\Extensionmanager\\Utility\\Parser\\AbstractExtensionXmlParser')) {
+               if (is_subclass_of($subject, \TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser::class)) {
                        $this->loadIntoDatabase($subject);
                }
        }
index 3d0131e..ec1e2ad 100644 (file)
@@ -83,7 +83,7 @@ class MirrorListUtility implements \SplObserver {
         */
        public function update(\SplSubject $subject) {
                // TODO mirrorxml_abstract_parser
-               if (is_subclass_of($subject, 'TYPO3\\CMS\\Extensionmanager\\Utility\\Parser\\AbstractXmlParser')) {
+               if (is_subclass_of($subject, \TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractXmlParser::class)) {
                        $this->arrTmpMirrors[] = $subject->getAll();
                }
        }
index b73cf76..c6f1e90 100644 (file)
@@ -42,12 +42,12 @@ class XmlParserFactory {
         */
        static protected $parsers = array(
                'extension' => array(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\Parser\\ExtensionXmlPullParser' => 'ExtensionXmlPullParser.php',
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\Parser\\ExtensionXmlPushParser' => 'ExtensionXmlPushParser.php'
+                       \TYPO3\CMS\Extensionmanager\Utility\Parser\ExtensionXmlPullParser::class => 'ExtensionXmlPullParser.php',
+                       \TYPO3\CMS\Extensionmanager\Utility\Parser\ExtensionXmlPushParser::class => 'ExtensionXmlPushParser.php'
                ),
                'mirror' => array(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\Parser\\MirrorXmlPullParser' => 'MirrorXmlPullParser.php',
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\Parser\\MirrorXmlPushParser' => 'MirrorXmlPushParser.php'
+                       \TYPO3\CMS\Extensionmanager\Utility\Parser\MirrorXmlPullParser::class=> 'MirrorXmlPullParser.php',
+                       \TYPO3\CMS\Extensionmanager\Utility\Parser\MirrorXmlPushParser::class => 'MirrorXmlPushParser.php'
                )
        );
 
index dfdd720..0b069ea 100644 (file)
@@ -30,13 +30,13 @@ class DownloadControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $dummyException = new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($dummyExceptionMessage);
 
                $dummyExtensionName = 'dummy_extension';
-               $dummyExtension = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $dummyExtension = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $dummyExtension->expects($this->any())->method('getExtensionKey')->will($this->returnValue($dummyExtensionName));
 
                $downloadUtilityMock = $this->getMock('\\TYPO3\\CMS\\Extensionmanager\\Utility\\DownloadUtility');
                $downloadUtilityMock->expects($this->any())->method('setDownloadPath')->willThrowException($dummyException);
 
-               $subject = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Controller\\DownloadController', array('dummy'));
+               $subject = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Controller\DownloadController::class, array('dummy'));
                $subject->_set('downloadUtility', $downloadUtilityMock);
 
                $result = $subject->_call('installFromTer', $dummyExtension);
index 5609c73..55bf334 100644 (file)
@@ -41,10 +41,10 @@ class UpdateFromTerControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $repositoryHelperMock;
 
        public function setUp() {
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $this->repositoryRepositoryMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\RepositoryRepository', array('findByUid'), array($this->mockObjectManager));
-               $this->extensionRepositoryMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository', array(), array($this->mockObjectManager));
-               $this->repositoryHelperMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper', array('updateExtList'), array(), '', FALSE);
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+               $this->repositoryRepositoryMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository::class, array('findByUid'), array($this->mockObjectManager));
+               $this->extensionRepositoryMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class, array(), array($this->mockObjectManager));
+               $this->repositoryHelperMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper::class, array('updateExtList'), array(), '', FALSE);
        }
 
        /**
@@ -52,11 +52,11 @@ class UpdateFromTerControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function updateExtensionListFromTerCallsUpdateExtListIfExtensionListIsEmpty() {
-               $controllerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Controller\\UpdateFromTerController', array('dummy'));
-               $repositoryModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository', array('getLastUpdate'));
+               $controllerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Controller\UpdateFromTerController::class, array('dummy'));
+               $repositoryModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class, array('getLastUpdate'));
 
-               $viewMock = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('assign'), array(), '', FALSE);
-               $requestMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('hasArgument', 'getArgument'));
+               $viewMock = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('assign'), array(), '', FALSE);
+               $requestMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('hasArgument', 'getArgument'));
                $viewMock->expects($this->any())->method('assign')->will($this->returnValue($viewMock));
                $this->repositoryRepositoryMock->expects($this->once())->method('findByUid')->with(1)->will($this->returnValue($repositoryModelMock));
                $this->repositoryHelperMock->expects($this->once())->method('updateExtList');
@@ -75,10 +75,10 @@ class UpdateFromTerControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function updateExtensionListFromTerDoesNotCallsUpdateExtListIfExtensionListIsNotEmpty() {
-               $controllerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Controller\\UpdateFromTerController', array('dummy'));
-               $repositoryModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository', array('getLastUpdate'));
-               $viewMock = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('assign'), array(), '', FALSE);
-               $requestMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('hasArgument', 'getArgument'));
+               $controllerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Controller\UpdateFromTerController::class, array('dummy'));
+               $repositoryModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class, array('getLastUpdate'));
+               $viewMock = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('assign'), array(), '', FALSE);
+               $requestMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('hasArgument', 'getArgument'));
                $viewMock->expects($this->any())->method('assign')->will($this->returnValue($viewMock));
                $this->repositoryRepositoryMock->expects($this->once())->method('findByUid')->with(1)->will($this->returnValue($repositoryModelMock));
                $this->repositoryHelperMock->expects($this->never())->method('updateExtList');
@@ -97,10 +97,10 @@ class UpdateFromTerControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function updateExtensionListFromTerCallsUpdateExtListIfForceUpdateCheckIsSet() {
-               $controllerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Controller\\UpdateFromTerController', array('dummy'));
-               $repositoryModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository', array('getLastUpdate'));
-               $viewMock = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\View\\TemplateView', array('assign'), array(), '', FALSE);
-               $requestMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Request', array('hasArgument', 'getArgument'));
+               $controllerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Controller\UpdateFromTerController::class, array('dummy'));
+               $repositoryModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class, array('getLastUpdate'));
+               $viewMock = $this->getAccessibleMock(\TYPO3\CMS\Fluid\View\TemplateView::class, array('assign'), array(), '', FALSE);
+               $requestMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Request::class, array('hasArgument', 'getArgument'));
                $viewMock->expects($this->any())->method('assign')->will($this->returnValue($viewMock));
                $this->repositoryRepositoryMock->expects($this->once())->method('findByUid')->with(1)->will($this->returnValue($repositoryModelMock));
                $this->repositoryHelperMock->expects($this->once())->method('updateExtList');
index f716362..5062aa0 100644 (file)
@@ -63,14 +63,14 @@ class UploadExtensionFileControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCa
         * @return void
         */
        public function getExtensionFromZipFileExtractsExtensionKey($filename, $expectedKey) {
-               $fixture = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Controller\\UploadExtensionFileController', array('dummy'));
-               $installUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility', array(), array(), '', FALSE);
+               $fixture = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController::class, array('dummy'));
+               $installUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, array(), array(), '', FALSE);
                $installUtilityMock->expects($this->once())
                        ->method('isAvailable')
                        ->with($expectedKey)
                        ->will($this->returnValue(FALSE));
                $fixture->_set('installUtility', $installUtilityMock);
-               $fileHandlingUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array(), array(), '', FALSE);
+               $fileHandlingUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array(), array(), '', FALSE);
                $fileHandlingUtilityMock->expects($this->once())->method('unzipExtensionFromFile');
                $fixture->_set('fileHandlingUtility', $fileHandlingUtilityMock);
 
index 53d45c7..d5e380c 100644 (file)
@@ -34,8 +34,8 @@ class DownloadQueueTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
-               $this->downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('dummy'));
-               $this->extensionMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('dummy'));
+               $this->downloadQueueMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\DownloadQueue::class, array('dummy'));
+               $this->extensionMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('dummy'));
                $this->extensionMock->setExtensionKey('foobar');
                $this->extensionMock->setVersion('1.0.0');
 
@@ -80,7 +80,7 @@ class DownloadQueueTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function addExtensionToQueueThrowsExceptionIfExtensionWithSameKeyAndDifferentValuesAlreadyExists() {
                /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extensionMock2 */
-               $extensionMock2 = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('dummy'));
+               $extensionMock2 = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('dummy'));
                $extensionMock2->setExtensionKey('foobar');
                $extensionMock2->setVersion('1.0.3');
 
@@ -93,7 +93,7 @@ class DownloadQueueTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function removeExtensionFromQueueRemovesExtension() {
-               $extensionMock2 = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('dummy'));
+               $extensionMock2 = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('dummy'));
                $extensionMock2->_set('extensionKey', 'foobarbaz');
                $extensionMock2->_set('version', '1.0.3');
                $this->downloadQueueMock->_set('extensionStorage', array(
index 9304deb..863278d 100644 (file)
@@ -38,11 +38,11 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
        public function setUp() {
                // Mock system under test to make protected methods accessible
                $this->configurationItemRepository = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ConfigurationItemRepository',
+                       \TYPO3\CMS\Extensionmanager\Domain\Repository\ConfigurationItemRepository::class,
                        array('dummy')
                );
 
-               $this->injectedObjectManagerMock = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface', array(), array(), '', FALSE);
+               $this->injectedObjectManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class, array(), array(), '', FALSE);
                $this->configurationItemRepository->_set(
                        'objectManager',
                        $this->injectedObjectManagerMock
@@ -90,14 +90,14 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                );
 
                $configurationItemRepository = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ConfigurationItemRepository',
+                       \TYPO3\CMS\Extensionmanager\Domain\Repository\ConfigurationItemRepository::class,
                        array('mergeWithExistingConfiguration', 'translate')
                );
                $configurationItemRepository->_set(
                        'objectManager',
                        $this->injectedObjectManagerMock
                );
-               $configurationUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ConfigurationUtility', array(), array(), '', FALSE);
+               $configurationUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility::class, array(), array(), '', FALSE);
                $configurationUtilityMock
                        ->expects($this->once())
                        ->method('getDefaultConfigurationFromExtConfTemplateAsValuedArray')
@@ -238,8 +238,8 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                                        'type' => 'user[EXT:saltedpasswords/classes/class.tx_saltedpasswords_emconfhelper.php:TYPO3\\CMS\\Saltedpasswords\\Utility\\ExtensionManagerConfigurationUtility->buildHashMethodSelectorFE]',
                                        'label' => 'Hashing method for the frontend: Defines salted hashing method to use. Choose "Portable PHP password hashing" to stay compatible with other CMS (e.g. Drupal, Wordpress). Choose "MD5 salted hashing" to reuse TYPO3 passwords for OS level authentication (other servers could use TYPO3 passwords). Choose "Blowfish salted hashing" for advanced security to reuse passwords on OS level (Blowfish might not be supported on your system TODO).',
                                        'name' => 'FE.saltedPWHashingMethod',
-                                       'value' => 'TYPO3\\CMS\\Saltedpasswords\\Salt\\PhpassSalt',
-                                       'default_value' => 'TYPO3\\CMS\\Saltedpasswords\\Salt\\PhpassSalt',
+                                       'value' => \TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt::class,
+                                       'default_value' => \TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt::class,
                                        'comparisonGeneric' => 'EXT:saltedpasswords/classes/class.tx_saltedpasswords_emconfhelper.php:TYPO3\\CMS\\Saltedpasswords\\Utility\\ExtensionManagerConfigurationUtility->buildHashMethodSelectorFE'
                                )
                        )
@@ -322,7 +322,7 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         */
        public function mergeDefaultConfigurationCatchesExceptionOfConfigurationManagerIfNoLocalConfigurationExists() {
                $exception = $this->getMock('RuntimeException');
-               $configurationManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+               $configurationManagerMock = $this->getMock(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
                $configurationManagerMock
                        ->expects($this->once())
                        ->method('getConfigurationValueByPath')
@@ -345,7 +345,7 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         */
        public function mergeDefaultConfigurationWithNoCurrentValuesReturnsTheDefaultConfiguration() {
                $exception = $this->getMock('RuntimeException');
-               $configurationManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+               $configurationManagerMock = $this->getMock(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
                $configurationManagerMock
                        ->expects($this->once())
                        ->method('getConfigurationValueByPath')
@@ -373,14 +373,14 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                $localConfiguration = serialize(array(
                        'FE.' => array(
                                'enabled' => '1',
-                               'saltedPWHashingMethod' => 'TYPO3\\CMS\\Saltedpasswords\\Salt\\SaltInterface_sha1'
+                               'saltedPWHashingMethod' => \TYPO3\CMS\Saltedpasswords\Salt\SaltInterface_sha1::class
                        ),
                        'CLI.' => array(
                                'enabled' => '0'
                        )
                ));
 
-               $configurationManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+               $configurationManagerMock = $this->getMock(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
                $configurationManagerMock
                        ->expects($this->once())
                        ->method('getConfigurationValueByPath')
@@ -397,13 +397,13 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                                'value' => '0'
                        ),
                        'FE.saltedPWHashingMethod' => array(
-                               'value' => 'TYPO3\\CMS\\Saltedpasswords\\Salt\\Md5Salt'
+                               'value' => \TYPO3\CMS\Saltedpasswords\Salt\Md5Salt::class
                        ),
                        'BE.enabled' => array(
                                'value' => '1'
                        ),
                        'BE.saltedPWHashingMethod' => array(
-                               'value' => 'TYPO3\\CMS\\Saltedpasswords\\Salt\\Md5Salt'
+                               'value' => \TYPO3\CMS\Saltedpasswords\Salt\Md5Salt::class
                        )
                );
 
@@ -412,13 +412,13 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                                'value' => '1'
                        ),
                        'FE.saltedPWHashingMethod' => array(
-                               'value' => 'TYPO3\\CMS\\Saltedpasswords\\Salt\\SaltInterface_sha1'
+                               'value' => \TYPO3\CMS\Saltedpasswords\Salt\SaltInterface_sha1::class
                        ),
                        'BE.enabled' => array(
                                'value' => '1'
                        ),
                        'BE.saltedPWHashingMethod' => array(
-                               'value' => 'TYPO3\\CMS\\Saltedpasswords\\Salt\\Md5Salt'
+                               'value' => \TYPO3\CMS\Saltedpasswords\Salt\Md5Salt::class
                        ),
                        'CLI.enabled' => array(
                                'value' => '0'
index 2c7ef23..8e305cc 100644 (file)
@@ -31,9 +31,9 @@ class RepositoryRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $fixture;
 
        public function setUp() {
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                /** @var $fixture \TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository|\PHPUnit_Framework_MockObject_MockObject */
-               $this->fixture = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\RepositoryRepository', array('findAll'), array($this->mockObjectManager));
+               $this->fixture = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository::class, array('findAll'), array($this->mockObjectManager));
        }
 
        /**
@@ -53,12 +53,12 @@ class RepositoryRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function findOneTypo3OrgRepositoryReturnsRepositoryWithCorrectTitle() {
-               $mockModelOne = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository');
+               $mockModelOne = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class);
                $mockModelOne
                        ->expects(($this->once()))
                        ->method('getTitle')
                        ->will($this->returnValue('foo'));
-               $mockModelTwo = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository');
+               $mockModelTwo = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class);
                $mockModelTwo
                        ->expects(($this->once()))
                        ->method('getTitle')
index 7929568..b7ccbaf 100644 (file)
@@ -40,25 +40,25 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Set up
         */
        public function setUp() {
-               $this->mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                /** @var $mockRepositoryRepository \TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository|\PHPUnit_Framework_MockObject_MockObject */
-               $this->mockRepositoryRepository = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\RepositoryRepository', array(), array($this->mockObjectManager));
-               $this->mockLanguageService = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array(), array(), '', FALSE);
+               $this->mockRepositoryRepository = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository::class, array(), array($this->mockObjectManager));
+               $this->mockLanguageService = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class, array(), array(), '', FALSE);
        }
 
        /**
         * @test
         */
        public function extensionStatusImplementsStatusProviderInterface() {
-               $reportMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array(), array(), '', FALSE);
-               $this->assertInstanceOf('TYPO3\\CMS\\Reports\\StatusProviderInterface', $reportMock);
+               $reportMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array(), array(), '', FALSE);
+               $this->assertInstanceOf(\TYPO3\CMS\Reports\StatusProviderInterface::class, $reportMock);
        }
 
        /**
         * @test
         */
        public function getStatusReturnsArray() {
-               $report = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('getSecurityStatusOfExtensions', 'getMainRepositoryStatus'), array(), '', FALSE);
+               $report = $this->getMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('getSecurityStatusOfExtensions', 'getMainRepositoryStatus'), array(), '', FALSE);
                $this->assertInternalType('array', $report->getStatus());
        }
 
@@ -66,7 +66,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getStatusReturnArrayContainsFiveEntries() {
-               $report = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('getSecurityStatusOfExtensions', 'getMainRepositoryStatus'), array(), '', FALSE);
+               $report = $this->getMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('getSecurityStatusOfExtensions', 'getMainRepositoryStatus'), array(), '', FALSE);
                $this->assertSame(5, count($report->getStatus()));
        }
 
@@ -74,14 +74,14 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getStatusReturnArrayContainsInstancesOfReportsStatusStatus() {
-               $statusObject = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array('title', 'value'));
+               $statusObject = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array('title', 'value'));
                /** @var \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus $report */
-               $report = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('getSecurityStatusOfExtensions', 'getMainRepositoryStatus'), array(), '', FALSE);
+               $report = $this->getMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('getSecurityStatusOfExtensions', 'getMainRepositoryStatus'), array(), '', FALSE);
                $report->expects($this->any())->method('getMainRepositoryStatus')->will($this->returnValue($statusObject));
                $resultStatuses = $report->getStatus();
                foreach($resultStatuses as $status) {
                        if ($status) {
-                               $this->assertInstanceOf('TYPO3\\CMS\\Reports\\Status', $status);
+                               $this->assertInstanceOf(\TYPO3\CMS\Reports\Status::class, $status);
                        }
                }
        }
@@ -91,7 +91,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getStatusCallsGetMainRepositoryStatusForMainRepositoryStatusResult() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -107,14 +107,14 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('getMainRepositoryStatus'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('getMainRepositoryStatus'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
                $mockReport->_set('listUtility', $mockListUtility);
                $mockReport->_set('languageService', $this->mockLanguageService);
@@ -137,9 +137,9 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ->will($this->returnValue(NULL));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->once())
                        ->method('get')
@@ -157,7 +157,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getMainRepositoryStatusReturnsNoticeIfRepositoryUpdateIsLongerThanSevenDaysAgo() {
                /** @var $mockRepositoryRepository \TYPO3\CMS\Extensionmanager\Domain\Model\Repository|\PHPUnit_Framework_MockObject_MockObject */
-               $mockRepository = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository');
+               $mockRepository = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class);
                $mockRepository
                        ->expects($this->once())
                        ->method('getLastUpdate')
@@ -169,9 +169,9 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ->will($this->returnValue($mockRepository));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->once())
                        ->method('get')
@@ -190,7 +190,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getMainRepositoryStatusReturnsOkIfUpdatedLessThanSevenDaysAgo() {
                /** @var $mockRepositoryRepository \TYPO3\CMS\Extensionmanager\Domain\Model\Repository|\PHPUnit_Framework_MockObject_MockObject */
-               $mockRepository = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository');
+               $mockRepository = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class);
                $mockRepository
                        ->expects($this->once())
                        ->method('getLastUpdate')
@@ -202,9 +202,9 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ->will($this->returnValue($mockRepository));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->once())
                        ->method('get')
@@ -223,7 +223,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsOkForLoadedExtensionIfNoInsecureExtensionIsLoaded() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -239,16 +239,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(0))
                        ->method('get')
@@ -268,7 +268,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsErrorForLoadedExtensionIfInsecureExtensionIsLoaded() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -284,16 +284,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(0))
                        ->method('get')
@@ -313,7 +313,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsOkForExistingExtensionIfNoInsecureExtensionExists() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -328,16 +328,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(1))
                        ->method('get')
@@ -357,7 +357,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsErrorForExistingExtensionIfInsecureExtensionExists() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -372,16 +372,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(1))
                        ->method('get')
@@ -401,7 +401,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsOkForLoadedExtensionIfNoOutdatedExtensionIsLoaded() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -417,16 +417,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(2))
                        ->method('get')
@@ -446,7 +446,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsErrorForLoadedExtensionIfOutdatedExtensionIsLoaded() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -462,16 +462,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(2))
                        ->method('get')
@@ -491,7 +491,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsOkForExistingExtensionIfNoOutdatedExtensionExists() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -506,16 +506,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(3))
                        ->method('get')
@@ -535,7 +535,7 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getSecurityStatusOfExtensionsReturnsErrorForExistingExtensionIfOutdatedExtensionExists() {
                /** @var $mockTerObject \TYPO3\CMS\Extensionmanager\Domain\Model\Extension|\PHPUnit_Framework_MockObject_MockObject */
-               $mockTerObject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $mockTerObject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $mockTerObject
                        ->expects($this->any())
                        ->method('getVersion')
@@ -550,16 +550,16 @@ class ExtensionStatusTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
                /** @var $mockListUtility \TYPO3\CMS\Extensionmanager\Utility\ListUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $mockListUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');
+               $mockListUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class);
                $mockListUtility
                        ->expects($this->once())
                        ->method('getAvailableAndInstalledExtensionsWithAdditionalInformation')
                        ->will($this->returnValue($mockExtensionList));
 
                /** @var $mockReport \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $mockReport = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus', array('dummy'), array(), '', FALSE);
+               $mockReport = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class, array('dummy'), array(), '', FALSE);
                $mockReport->_set('objectManager', $this->mockObjectManager);
-               $statusMock = $this->getMock('TYPO3\\CMS\\Reports\\Status', array(), array(), '', FALSE);
+               $statusMock = $this->getMock(\TYPO3\CMS\Reports\Status::class, array(), array(), '', FALSE);
                $this->mockObjectManager
                        ->expects($this->at(3))
                        ->method('get')
index 6233a62..f36df6f 100644 (file)
@@ -26,17 +26,17 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         */
        public function resolveDependenciesCallsDownloadDependenciesIfDownloadKeyExistsInQueue() {
                $managementMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService',
+                       \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class,
                        array('downloadDependencies', 'uninstallDependenciesToBeUpdated', 'setInExtensionRepository', 'downloadMainExtension')
                );
                $managementMock->expects($this->any())->method('downloadMainExtension')->will($this->returnValue(array()));
-               $extensionModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $extensionModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $extensionModelMock->_set('extensionKey', 'foobar');
                $extensionModelMock->_set('version', '1.0.0');
-               $dependencyUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('checkDependencies'));
+               $dependencyUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('checkDependencies'));
                $dependencyUtilityMock->expects($this->atLeastOnce())->method('checkDependencies');
                $managementMock->_set('dependencyUtility', $dependencyUtilityMock);
-               $downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('getExtensionQueue', 'addExtensionToInstallQueue'));
+               $downloadQueueMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\DownloadQueue::class, array('getExtensionQueue', 'addExtensionToInstallQueue'));
                $downloadQueueMock->expects($this->atLeastOnce())->method('getExtensionQueue')->will($this->returnValue(array(
                        'download' => array(
                                'foo' => $extensionModelMock
@@ -53,17 +53,17 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         */
        public function resolveDependenciesCallsUpdateAndDownloadDependenciesIfUpdateKeyExistsInQueue() {
                $managementMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService',
+                       \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class,
                        array('downloadDependencies', 'uninstallDependenciesToBeUpdated', 'setInExtensionRepository', 'downloadMainExtension')
                );
                $managementMock->expects($this->any())->method('downloadMainExtension')->will($this->returnValue(array()));
-               $extensionModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension');
+               $extensionModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
                $extensionModelMock->_set('extensionKey', 'foobar');
                $extensionModelMock->_set('version', '1.0.0');
-               $dependencyUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('checkDependencies'));
+               $dependencyUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('checkDependencies'));
                $dependencyUtilityMock->expects($this->atLeastOnce())->method('checkDependencies');
                $managementMock->_set('dependencyUtility', $dependencyUtilityMock);
-               $downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('getExtensionQueue', 'addExtensionToInstallQueue'));
+               $downloadQueueMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\DownloadQueue::class, array('getExtensionQueue', 'addExtensionToInstallQueue'));
                $downloadQueueMock->expects($this->atLeastOnce())->method('getExtensionQueue')->will($this->returnValue(array(
                        'update' => array(
                                'foo' => $extensionModelMock
@@ -80,19 +80,19 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @return void
         */
        public function downloadDependenciesCallsDownloadUtilityDownloadMethod() {
-               $managementMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService', array(
+               $managementMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, array(
                        'dummy'
                ));
 
-               $extensionModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('getExtensionKey'));
+               $extensionModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('getExtensionKey'));
                $extensionModelMock->_set('extensionKey', 'foobar');
                $extensionModelMock->_set('version', '1.0.0');
 
-               $dependencyUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $dependencyUtilityMock->expects($this->atLeastOnce())->method('checkDependencies');
-               $installUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility');
+               $installUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class);
                $installUtilityMock->expects($this->any())->method('enrichExtensionWithDetails')->will($this->returnValue(array()));
-               $extensionModelUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ExtensionModelUtility');
+               $extensionModelUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::class);
                $extensionModelUtilityMock->expects($this->any())->method('mapExtensionArrayToModel')->will($this->returnValue($extensionModelMock));
                $managementMock->_set('dependencyUtility', $dependencyUtilityMock);
                $managementMock->_set('installUtility', $installUtilityMock);
@@ -101,8 +101,8 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                $downloadQueue = array(
                        $extensionModelMock
                );
-               $downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
-               $downloadUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DownloadUtility', array('download'));
+               $downloadQueueMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\DownloadQueue::class, array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
+               $downloadUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DownloadUtility::class, array('download'));
                $downloadUtilityMock->expects($this->once())->method('download')->with($extensionModelMock);
                $managementMock->_set('downloadUtility', $downloadUtilityMock);
                $managementMock->_set('downloadQueue', $downloadQueueMock);
@@ -114,30 +114,30 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @return void
         */
        public function downloadDependenciesCallsRemoveExtensionFromQueue() {
-               $managementMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService', array(
+               $managementMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, array(
                        'dummy'
                ));
 
                /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extensionModelMock */
-               $extensionModelMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('getExtensionKey'));
+               $extensionModelMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('getExtensionKey'));
                $extensionModelMock->setExtensionKey('foobar');
                $extensionModelMock->setVersion('1.0.0');
                $downloadQueue = array(
                        $extensionModelMock
                );
 
-               $dependencyUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $dependencyUtilityMock->expects($this->atLeastOnce())->method('checkDependencies');
-               $installUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility');
+               $installUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class);
                $installUtilityMock->expects($this->any())->method('enrichExtensionWithDetails')->will($this->returnValue(array()));
-               $extensionModelUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ExtensionModelUtility');
+               $extensionModelUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::class);
                $extensionModelUtilityMock->expects($this->any())->method('mapExtensionArrayToModel')->will($this->returnValue($extensionModelMock));
                $managementMock->_set('dependencyUtility', $dependencyUtilityMock);
                $managementMock->_set('installUtility', $installUtilityMock);
                $managementMock->_set('extensionModelUtility', $extensionModelUtilityMock);
 
-               $downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
-               $downloadUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DownloadUtility', array('download'));
+               $downloadQueueMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\DownloadQueue::class, array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
+               $downloadUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DownloadUtility::class, array('download'));
                $downloadQueueMock->expects($this->once())->method('removeExtensionFromQueue')->with($extensionModelMock);
                $managementMock->_set('downloadUtility', $downloadUtilityMock);
                $managementMock->_set('downloadQueue', $downloadQueueMock);
@@ -149,29 +149,29 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @return void
         */
        public function downloadDependenciesReturnsResolvedDependencies() {
-               $managementMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService', array(
+               $managementMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, array(
                        'dummy'
                ));
 
-               $extensionModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('getExtensionKey'));
+               $extensionModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('getExtensionKey'));
                $extensionModelMock->_set('extensionKey', 'foobar');
                $extensionModelMock->_set('version', '1.0.0');
                $downloadQueue = array(
                        $extensionModelMock
                );
 
-               $dependencyUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $dependencyUtilityMock->expects($this->atLeastOnce())->method('checkDependencies');
-               $installUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility');
+               $installUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class);
                $installUtilityMock->expects($this->any())->method('enrichExtensionWithDetails')->will($this->returnValue(array()));
-               $extensionModelUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ExtensionModelUtility');
+               $extensionModelUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::class);
                $extensionModelUtilityMock->expects($this->any())->method('mapExtensionArrayToModel')->will($this->returnValue($extensionModelMock));
                $managementMock->_set('dependencyUtility', $dependencyUtilityMock);
                $managementMock->_set('installUtility', $installUtilityMock);
                $managementMock->_set('extensionModelUtility', $extensionModelUtilityMock);
 
-               $downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
-               $downloadUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DownloadUtility', array('download'));
+               $downloadQueueMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\DownloadQueue::class, array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
+               $downloadUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DownloadUtility::class, array('download'));
                $extensionModelMock->expects($this->atLeastOnce())->method('getExtensionKey')->will($this->returnValue('foobar'));
                $managementMock->_set('downloadUtility', $downloadUtilityMock);
                $managementMock->_set('downloadQueue', $downloadQueueMock);
@@ -184,17 +184,17 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @return void
         */
        public function uninstallDependenciesToBeUpdatedCallsUninstall() {
-               $managementMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService', array(
+               $managementMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, array(
                        'dummy'
                ));
-               $extensionModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('getExtensionKey'));
+               $extensionModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('getExtensionKey'));
                $extensionModelMock->_set('extensionKey', 'foobar');
                $extensionModelMock->_set('version', '1.0.0');
                $extensionModelMock->expects($this->atLeastOnce())->method('getExtensionKey')->will($this->returnValue('foobar'));
                $downloadQueue = array(
                        $extensionModelMock
                );
-               $installUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility', array('uninstall'), array(), '', FALSE);
+               $installUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, array('uninstall'), array(), '', FALSE);
                $installUtility->expects($this->once())->method('uninstall')->with('foobar');
                $managementMock->_set('installUtility', $installUtility);
                $managementMock->_call('uninstallDependenciesToBeUpdated', $downloadQueue);
@@ -205,17 +205,17 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @return void
         */
        public function uninstallDependenciesToBeUpdatedReturnsResolvedDependencies() {
-               $managementMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService', array(
+               $managementMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, array(
                        'dummy'
                ));
-               $extensionModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('getExtensionKey'));
+               $extensionModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('getExtensionKey'));
                $extensionModelMock->_set('extensionKey', 'foobar');
                $extensionModelMock->_set('version', '1.0.0');
                $extensionModelMock->expects($this->atLeastOnce())->method('getExtensionKey')->will($this->returnValue('foobar'));
                $downloadQueue = array(
                        $extensionModelMock
                );
-               $installUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility', array('uninstall'), array(), '', FALSE);
+               $installUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, array('uninstall'), array(), '', FALSE);
                $managementMock->_set('installUtility', $installUtility);
                $resolvedDependencies = $managementMock->_call('uninstallDependenciesToBeUpdated', $downloadQueue);
                $this->assertEquals(array('updated' => array('foobar' => $extensionModelMock)), $resolvedDependencies);
@@ -227,7 +227,7 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         */
        public function installDependenciesCallsInstall() {
                $managementMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService',
+                       \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class,
                        array('emitWillInstallExtensionsSignal', 'emitHasInstalledExtensionSignal')
                );
                $installQueue = array(
@@ -236,7 +236,7 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                                'siteRelPath' => 'path'
                        )
                );
-               $installUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility', array('install','emitWillInstallExtensionsSignal'), array(), '', FALSE);
+               $installUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, array('install','emitWillInstallExtensionsSignal'), array(), '', FALSE);
                $installUtility->expects($this->once())->method('install')->with(array(
                        'key' => 'foobar',
                        'siteRelPath' => 'path'
@@ -250,14 +250,14 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         * @return void
         */
        public function installDependenciesReturnsResolvedDependencies() {
-               $managementMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService', array(
+               $managementMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, array(
                        'emitWillInstallExtensionsSignal',
                        'emitHasInstalledExtensionSignal'
                ));
                $installQueue = array(
                        'foobar' => 'foobar'
                );
-               $installUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility', array('install','emitWillInstallExtensionsSignal'), array(), '', FALSE);
+               $installUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, array('install','emitWillInstallExtensionsSignal'), array(), '', FALSE);
                $installUtility->expects($this->once())->method('install')->with('foobar');
                $managementMock->_set('installUtility', $installUtility);
                $resolvedDependencies = $managementMock->_call('installDependencies', $installQueue);
index 2fc54fc..71b8b04 100644 (file)
@@ -38,7 +38,7 @@ class UpdateExtensionListTaskTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        $this->markTestSkipped('Tests need EXT:scheduler loaded.');
                }
                $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
-               $this->repositoryHelper = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper', array(), array(), '', FALSE);
+               $this->repositoryHelper = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper::class, array(), array(), '', FALSE);
        }
 
        /**
@@ -53,8 +53,8 @@ class UpdateExtensionListTaskTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function updateExtensionListTaskIsInstanceOfAbstractTask() {
-               $taskMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Task\\UpdateExtensionListTask');
-               $this->assertInstanceOf('TYPO3\\CMS\\Scheduler\\Task\\AbstractTask', $taskMock);
+               $taskMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Task\UpdateExtensionListTask::class);
+               $this->assertInstanceOf(\TYPO3\CMS\Scheduler\Task\AbstractTask::class, $taskMock);
        }
 
        /**
@@ -65,22 +65,22 @@ class UpdateExtensionListTaskTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ->expects($this->once())
                                ->method('updateExtList');
 
-               $objectManagerMock = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               $objectManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
                $objectManagerMock
                                ->expects($this->at(0))
                                ->method('get')
-                               ->with('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper')
+                               ->with(\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper::class)
                                ->will($this->returnValue($this->repositoryHelper));
 
-               $persistenceManagerMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
+               $persistenceManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class);
                $objectManagerMock
                                ->expects($this->at(1))
                                ->method('get')
                                ->will($this->returnValue($persistenceManagerMock));
 
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', $objectManagerMock);
+               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class, $objectManagerMock);
 
-               $task = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Task\\UpdateExtensionListTask', array('dummy'), array(), '', FALSE);
+               $task = $this->getMock(\TYPO3\CMS\Extensionmanager\Task\UpdateExtensionListTask::class, array('dummy'), array(), '', FALSE);
                $task->execute();
        }
 
@@ -88,14 +88,14 @@ class UpdateExtensionListTaskTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function executeCallsPersistAllOnPersistenceManager() {
-               $objectManagerMock = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               $objectManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
                $objectManagerMock
                        ->expects($this->at(0))
                        ->method('get')
-                       ->with('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper')
+                       ->with(\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper::class)
                        ->will($this->returnValue($this->repositoryHelper));
 
-               $persistenceManagerMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
+               $persistenceManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class);
                $persistenceManagerMock
                        ->expects($this->once())
                        ->method('persistAll');
@@ -105,9 +105,9 @@ class UpdateExtensionListTaskTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ->method('get')
                                ->will($this->returnValue($persistenceManagerMock));
 
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', $objectManagerMock);
+               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class, $objectManagerMock);
 
-               $task = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Task\\UpdateExtensionListTask', array('dummy'), array(), '', FALSE);
+               $task = $this->getMock(\TYPO3\CMS\Extensionmanager\Task\UpdateExtensionListTask::class, array('dummy'), array(), '', FALSE);
                $task->execute();
        }
 }
index 00af28c..411310d 100644 (file)
@@ -26,7 +26,7 @@ class ConfigurationUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getCurrentConfigurationReturnsExtensionConfigurationAsValuedConfiguration() {
                /** @var $configurationUtility \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject */
                $configurationUtility = $this->getMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\ConfigurationUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility::class,
                        array('getDefaultConfigurationFromExtConfTemplateAsValuedArray')
                );
                $configurationUtility
@@ -62,7 +62,7 @@ class ConfigurationUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function getDefaultConfigurationFromExtConfTemplateAsValuedArrayReturnsExpectedExampleArray() {
                /** @var $configurationUtility \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject */
                $configurationUtility = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\ConfigurationUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility::class,
                        array('getDefaultConfigurationRawString', 'getExtensionPathInformation')
                );
                $configurationUtility
@@ -75,14 +75,14 @@ class ConfigurationUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ->method('getExtensionPathInformation')
                        ->will($this->returnValue(NULL));
 
-               $tsStyleConfig = $this->getMock('TYPO3\\CMS\\Core\\TypoScript\\ConfigurationForm');
+               $tsStyleConfig = $this->getMock(\TYPO3\CMS\Core\TypoScript\ConfigurationForm::class);
 
-               $objectManagerMock = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $objectManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
                $configurationUtility->_set('objectManager', $objectManagerMock);
                $objectManagerMock
                        ->expects($this->once())
                        ->method('get')
-                       ->with('TYPO3\\CMS\\Core\\TypoScript\\ConfigurationForm')
+                       ->with(\TYPO3\CMS\Core\TypoScript\ConfigurationForm::class)
                        ->will($this->returnValue($tsStyleConfig));
 
                $constants = array(
@@ -248,7 +248,7 @@ class ConfigurationUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function convertValuedToNestedConfiguration(array $configuration, array $expected) {
                /** @var $subject \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $subject = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ConfigurationUtility', array('dummy'), array(), '', FALSE);
+               $subject = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility::class, array('dummy'), array(), '', FALSE);
                $this->assertEquals($expected, $subject->convertValuedToNestedConfiguration($configuration));
        }
 
@@ -314,7 +314,7 @@ class ConfigurationUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function convertNestedToValuedConfiguration(array $configuration, array $expected) {
                /** @var $subject \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-               $subject = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ConfigurationUtility', array('dummy'), array(), '', FALSE);
+               $subject = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility::class, array('dummy'), array(), '', FALSE);
                $this->assertEquals($expected, $subject->convertNestedToValuedConfiguration($configuration));
        }
 }
index 208956c..ded4c68 100644 (file)
@@ -29,7 +29,7 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
-               $this->objectManagerMock = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
+               $this->objectManagerMock = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
        }
 
        /**
@@ -38,12 +38,12 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkTypo3DependencyThrowsExceptionIfVersionNumberIsTooLow() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('15.0.0'));
                $dependencyMock->setIdentifier('typo3');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
-               $this->setExpectedException('TYPO3\\CMS\\Extensionmanager\\Exception\\ExtensionManagerException','', 1399144499);
+               $this->setExpectedException(\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException::class,'', 1399144499);
                $dependencyUtility->_call('checkTypo3Dependency', $dependencyMock);
        }
 
@@ -53,13 +53,13 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkTypo3DependencyThrowsExceptionIfVersionNumberIsTooHigh() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('3.0.0'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $dependencyMock->setIdentifier('typo3');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
-               $this->setExpectedException('TYPO3\\CMS\\Extensionmanager\\Exception\\ExtensionManagerException', '', 1399144521);
+               $this->setExpectedException(\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException::class, '', 1399144521);
                $dependencyUtility->_call('checkTypo3Dependency', $dependencyMock);
        }
 
@@ -69,11 +69,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkTypo3DependencyThrowsExceptionIfIdentifierIsNotTypo3() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->setIdentifier('123');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
-               $this->setExpectedException('TYPO3\\CMS\\Extensionmanager\\Exception\\ExtensionManagerException', '', 1399144551);
+               $this->setExpectedException(\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException::class, '', 1399144551);
                $dependencyUtility->_call('checkTypo3Dependency', $dependencyMock);
        }
 
@@ -83,11 +83,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkTypo3DependencyReturnsTrueIfVersionNumberIsInRange() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('15.0.0'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $dependencyMock->setIdentifier('typo3');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertTrue($dependencyUtility->_call('checkTypo3Dependency', $dependencyMock));
        }
@@ -98,11 +98,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkTypo3DependencyCanHandleEmptyVersionHighestVersion() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue(''));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $dependencyMock->setIdentifier('typo3');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertTrue($dependencyUtility->_call('checkTypo3Dependency', $dependencyMock));
        }
@@ -113,11 +113,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkTypo3DependencyCanHandleEmptyVersionLowestVersion() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('15.0.0'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue(''));
                $dependencyMock->setIdentifier('typo3');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertTrue($dependencyUtility->_call('checkTypo3Dependency', $dependencyMock));
        }
@@ -128,12 +128,12 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkPhpDependencyThrowsExceptionIfVersionNumberIsTooLow() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('15.0.0'));
                $dependencyMock->setIdentifier('php');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
-               $this->setExpectedException('TYPO3\\CMS\\Extensionmanager\\Exception\\ExtensionManagerException', '', 1377977857);
+               $this->setExpectedException(\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException::class, '', 1377977857);
                $dependencyUtility->_call('checkPhpDependency', $dependencyMock);
        }
 
@@ -143,13 +143,13 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkPhpDependencyThrowsExceptionIfVersionNumberIsTooHigh() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('3.0.0'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $dependencyMock->setIdentifier('php');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
-               $this->setExpectedException('TYPO3\\CMS\\Extensionmanager\\Exception\\ExtensionManagerException', '', 1377977856);
+               $this->setExpectedException(\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException::class, '', 1377977856);
                $dependencyUtility->_call('checkPhpDependency', $dependencyMock);
        }
 
@@ -159,11 +159,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkPhpDependencyThrowsExceptionIfIdentifierIsNotTypo3() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->setIdentifier('123');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
-               $this->setExpectedException('TYPO3\\CMS\\Extensionmanager\\Exception\\ExtensionManagerException', '', 1377977858);
+               $this->setExpectedException(\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException::class, '', 1377977858);
                $dependencyUtility->_call('checkPhpDependency', $dependencyMock);
        }
 
@@ -173,11 +173,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkPhpDependencyReturnsTrueIfVersionNumberIsInRange() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('15.0.0'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $dependencyMock->setIdentifier('php');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertTrue($dependencyUtility->_call('checkPhpDependency', $dependencyMock));
        }
@@ -188,11 +188,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkPhpDependencyCanHandleEmptyVersionHighestVersion() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue(''));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $dependencyMock->setIdentifier('php');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertTrue($dependencyUtility->_call('checkPhpDependency', $dependencyMock));
        }
@@ -203,11 +203,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkPhpDependencyCanHandleEmptyVersionLowestVersion() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('15.0.0'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue(''));
                $dependencyMock->setIdentifier('php');
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertTrue($dependencyUtility->_call('checkPhpDependency', $dependencyMock));
        }
@@ -218,15 +218,15 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkDependenciesCallsMethodToCheckPhpDependencies() {
                /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extensionMock */
-               $extensionMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('dummy'));
+               $extensionMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('dummy'));
                /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->setIdentifier('php');
                $dependencyStorage = new \SplObjectStorage();
                $dependencyStorage->attach($dependencyMock);
                $extensionMock->setDependencies($dependencyStorage);
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility $dependencyUtility */
-               $dependencyUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('checkPhpDependency', 'checkTypo3Dependency'));
+               $dependencyUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('checkPhpDependency', 'checkTypo3Dependency'));
                $dependencyUtility->expects($this->atLeastOnce())->method('checkPhpDependency');
                $dependencyUtility->checkDependencies($extensionMock);
        }
@@ -237,15 +237,15 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function checkDependenciesCallsMethodToCheckTypo3Dependencies() {
                /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extensionMock */
-               $extensionMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', array('dummy'));
+               $extensionMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, array('dummy'));
                /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->setIdentifier('typo3');
                $dependencyStorage = new \SplObjectStorage();
                $dependencyStorage->attach($dependencyMock);
                $extensionMock->setDependencies($dependencyStorage);
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility $dependencyUtility */
-               $dependencyUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('checkPhpDependency', 'checkTypo3Dependency'));
+               $dependencyUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('checkPhpDependency', 'checkTypo3Dependency'));
 
                $dependencyUtility->expects($this->atLeastOnce())->method('checkTypo3Dependency');
                $dependencyUtility->checkDependencies($extensionMock);
@@ -257,11 +257,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function isVersionCompatibleReturnsTrueForCompatibleVersion() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('15.0.0'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $version = '3.3.3';
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertTrue($dependencyUtility->_call('isVersionCompatible', $version, $dependencyMock));
        }
@@ -272,11 +272,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function isVersionCompatibleReturnsFalseForIncompatibleVersion() {
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency $dependencyMock */
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->atLeastOnce())->method('getHighestVersion')->will($this->returnValue('1.0.1'));
                $dependencyMock->expects($this->atLeastOnce())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
                $version = '3.3.3';
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
 
                $this->assertFalse($dependencyUtility->_call('isVersionCompatible', $version, $dependencyMock));
        }
@@ -291,9 +291,9 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'foo' => array(),
                        'bar' => array()
                );
-               $listUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility', array('getAvailableExtensions'));
+               $listUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class, array('getAvailableExtensions'));
                $listUtilityMock->expects($this->atLeastOnce())->method('getAvailableExtensions')->will($this->returnValue($availableExtensions));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
                $dependencyUtility->_set('listUtility', $listUtilityMock);
 
                $this->assertTrue($dependencyUtility->_call('isDependentExtensionAvailable', 'dummy'));
@@ -309,9 +309,9 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'foo' => array(),
                        'bar' => array()
                );
-               $listUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility', array('getAvailableExtensions'));
+               $listUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class, array('getAvailableExtensions'));
                $listUtilityMock->expects($this->atLeastOnce())->method('getAvailableExtensions')->will($this->returnValue($availableExtensions));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
                $dependencyUtility->_set('listUtility', $listUtilityMock);
 
                $this->assertFalse($dependencyUtility->_call('isDependentExtensionAvailable', '42'));
@@ -322,13 +322,13 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function isAvailableVersionCompatibleCallsIsVersionCompatibleWithExtensionVersion() {
-               $emConfUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\EmConfUtility', array('includeEmConf'));
+               $emConfUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\EmConfUtility::class, array('includeEmConf'));
                $emConfUtility->expects($this->once())->method('includeEmConf')->will($this->returnValue(array(
                        'key' => 'dummy',
                        'version' => '1.0.0'
                )));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('setAvailableExtensions', 'isVersionCompatible'));
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getIdentifier'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('setAvailableExtensions', 'isVersionCompatible'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getIdentifier'));
                $dependencyMock->expects($this->once())->method('getIdentifier')->will($this->returnValue('dummy'));
                $dependencyUtility->_set('emConfUtility', $emConfUtility);
                $dependencyUtility->_set('availableExtensions', array(
@@ -346,9 +346,9 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function isExtensionDownloadableFromTerReturnsTrueIfOneVersionExists() {
-               $extensionRepositoryMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository', array('countByExtensionKey'), array($this->objectManagerMock));
+               $extensionRepositoryMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class, array('countByExtensionKey'), array($this->objectManagerMock));
                $extensionRepositoryMock->expects($this->once())->method('countByExtensionKey')->with('test123')->will($this->returnValue(1));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
                $dependencyUtility->_set('extensionRepository', $extensionRepositoryMock);
                $count = $dependencyUtility->_call('isExtensionDownloadableFromTer', 'test123');
 
@@ -360,9 +360,9 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function isExtensionDownloadableFromTerReturnsFalseIfNoVersionExists() {
-               $extensionRepositoryMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository', array('countByExtensionKey'), array($this->objectManagerMock));
+               $extensionRepositoryMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class, array('countByExtensionKey'), array($this->objectManagerMock));
                $extensionRepositoryMock->expects($this->once())->method('countByExtensionKey')->with('test123')->will($this->returnValue(0));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
                $dependencyUtility->_set('extensionRepository', $extensionRepositoryMock);
                $count = $dependencyUtility->_call('isExtensionDownloadableFromTer', 'test123');
 
@@ -374,13 +374,13 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function isDownloadableVersionCompatibleReturnsTrueIfCompatibleVersionExists() {
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getIdentifier', 'getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getIdentifier', 'getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->once())->method('getIdentifier')->will($this->returnValue('dummy'));
                $dependencyMock->expects($this->once())->method('getHighestVersion')->will($this->returnValue('10.0.0'));
                $dependencyMock->expects($this->once())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
-               $extensionRepositoryMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository', array('countByVersionRangeAndExtensionKey'), array($this->objectManagerMock));
+               $extensionRepositoryMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class, array('countByVersionRangeAndExtensionKey'), array($this->objectManagerMock));
                $extensionRepositoryMock->expects($this->once())->method('countByVersionRangeAndExtensionKey')->with('dummy', 1000000, 10000000)->will($this->returnValue(2));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
                $dependencyUtility->_set('extensionRepository', $extensionRepositoryMock);
                $count = $dependencyUtility->_call('isDownloadableVersionCompatible', $dependencyMock);
 
@@ -392,11 +392,11 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function isDownloadableVersionCompatibleReturnsFalseIfIncompatibleVersionExists() {
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getIdentifier'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getIdentifier'));
                $dependencyMock->expects($this->once())->method('getIdentifier')->will($this->returnValue('dummy'));
-               $extensionRepositoryMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository', array('countByVersionRangeAndExtensionKey'), array($this->objectManagerMock));
+               $extensionRepositoryMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class, array('countByVersionRangeAndExtensionKey'), array($this->objectManagerMock));
                $extensionRepositoryMock->expects($this->once())->method('countByVersionRangeAndExtensionKey')->with('dummy', 1000000, 2000000)->will($this->returnValue(0));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('getLowestAndHighestIntegerVersions'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('getLowestAndHighestIntegerVersions'));
                $dependencyUtility->_set('extensionRepository', $extensionRepositoryMock);
                $dependencyUtility->expects($this->once())->method('getLowestAndHighestIntegerVersions')->will($this->returnValue(array(
                        'lowestIntegerVersion' => 1000000,
@@ -417,10 +417,10 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'highestIntegerVersion' => 2000000
                );
 
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getHighestVersion', 'getLowestVersion'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getHighestVersion', 'getLowestVersion'));
                $dependencyMock->expects($this->once())->method('getHighestVersion')->will($this->returnValue('2.0.0'));
                $dependencyMock->expects($this->once())->method('getLowestVersion')->will($this->returnValue('1.0.0'));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('dummy'));
                $versions = $dependencyUtility->_call('getLowestAndHighestIntegerVersions', $dependencyMock);
 
                $this->assertSame($expectedVersions, $versions);
@@ -442,19 +442,19 @@ class DependencyUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $myStorage = new $className();
                $myStorage->extensions[] = $extension1;
                $myStorage->extensions[] = $extension2;
-               $dependencyMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('getIdentifier'));
+               $dependencyMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('getIdentifier'));
                $dependencyMock->expects($this->once())->method('getIdentifier')->will($this->returnValue('foobar'));
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility', array('getLowestAndHighestIntegerVersions'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class, array('getLowestAndHighestIntegerVersions'));
                $dependencyUtility->expects($this->once())->method('getLowestAndHighestIntegerVersions')->will($this->returnValue(array(
                        'lowestIntegerVersion' => 1000000,
                        'highestIntegerVersion' => 2000000
                )));
-               $extensionRepositoryMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository', array('findByVersionRangeAndExtensionKeyOrderedByVersion'), array($this->objectManagerMock));
+               $extensionRepositoryMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class, array('findByVersionRangeAndExtensionKeyOrderedByVersion'), array($this->objectManagerMock));
                $extensionRepositoryMock->expects($this->once())->method('findByVersionRangeAndExtensionKeyOrderedByVersion')->with('foobar', 1000000, 2000000)->will($this->returnValue($myStorage));
                $dependencyUtility->_set('extensionRepository', $extensionRepositoryMock);
                $extension = $dependencyUtility->_call('getLatestCompatibleExtensionByIntegerVersionDependency', $dependencyMock);
 
-               $this->assertInstanceOf('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Extension', $extension);
+               $this->assertInstanceOf(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class, $extension);
                $this->assertSame('foo', $extension->getExtensionKey());
        }
 
index 9700627..31a36af 100644 (file)
@@ -32,9 +32,9 @@ class ExtensionModelUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                ));
                /** @var $dependencyUtility \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility */
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ExtensionModelUtility', array('dummy'));
-               $objectManagerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', array('get'));
-               $dependencyModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::class, array('dummy'));
+               $objectManagerMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class, array('get'));
+               $dependencyModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('dummy'));
                $objectManagerMock->expects($this->any())->method('get')->will($this->returnValue($dependencyModelMock));
                $dependencyUtility->_set('objectManager', $objectManagerMock);
                $objectStorage = $dependencyUtility->convertDependenciesToObjects($serializedDependencies);
@@ -54,9 +54,9 @@ class ExtensionModelUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                ));
                /** @var $dependencyUtility \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility */
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ExtensionModelUtility', array('dummy'));
-               $objectManagerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', array('get'));
-               $dependencyModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('setIdentifier'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::class, array('dummy'));
+               $objectManagerMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class, array('get'));
+               $dependencyModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('setIdentifier'));
                $objectManagerMock->expects($this->any())->method('get')->will($this->returnValue($dependencyModelMock));
                $dependencyUtility->_set('objectManager', $objectManagerMock);
                $dependencyModelMock->expects($this->at(0))->method('setIdentifier')->with('php');
@@ -127,9 +127,9 @@ class ExtensionModelUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function convertDependenciesToObjectSetsVersion(array $dependencies, array $returnValue) {
                $serializedDependencies = serialize($dependencies);
                /** @var $dependencyUtility \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility */
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ExtensionModelUtility', array('dummy'));
-               $objectManagerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', array('get'));
-               $dependencyModelMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Dependency', array('setHighestVersion', 'setLowestVersion'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::class, array('dummy'));
+               $objectManagerMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class, array('get'));
+               $dependencyModelMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::class, array('setHighestVersion', 'setLowestVersion'));
                $objectManagerMock->expects($this->any())->method('get')->will($this->returnValue($dependencyModelMock));
                $dependencyUtility->_set('objectManager', $objectManagerMock);
                $dependencyModelMock->expects($this->atLeastOnce())->method('setLowestVersion')->with($this->identicalTo($returnValue[0]));
@@ -146,7 +146,7 @@ class ExtensionModelUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
                $serializedDependencies = serialize($dependencies);
                /** @var $dependencyUtility \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility */
-               $dependencyUtility = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ExtensionModelUtility', array('dummy'));
+               $dependencyUtility = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::class, array('dummy'));
                $dependencyObject = $dependencyUtility->convertDependenciesToObjects($serializedDependencies);
                $this->assertSame(0, $dependencyObject->count());
        }
index b54ab3e..8f50cc5 100644 (file)
@@ -54,7 +54,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function makeAndClearExtensionDirRemovesExtensionDirIfAlreadyExists() {
                $extKey = $this->createFakeExtension();
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('removeDirectory', 'addDirectory', 'getExtensionDir'), array(), '', FALSE);
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('removeDirectory', 'addDirectory', 'getExtensionDir'), array(), '', FALSE);
                $fileHandlerMock->expects($this->once())
                        ->method('removeDirectory')
                        ->with(PATH_site . 'typo3temp/ext-' . $extKey . '/');
@@ -83,7 +83,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
         */
        public function getAbsolutePathThrowsExceptionForInvalidRelativePaths($invalidRelativePath) {
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('dummy'), array());
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('dummy'), array());
                $fileHandlerMock->_call('getAbsolutePath', $invalidRelativePath);
        }
 
@@ -104,7 +104,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider validRelativePathDataProvider
         */
        public function getAbsolutePathReturnsAbsolutePathForValidRelativePaths($validRelativePath, $expectedAbsolutePath) {
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('dummy'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('dummy'));
                $this->assertSame($expectedAbsolutePath, $fileHandlerMock->_call('getAbsolutePath', $validRelativePath));
        }
 
@@ -114,7 +114,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function makeAndClearExtensionDirAddsDir() {
                $extKey = $this->createFakeExtension();
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('removeDirectory', 'addDirectory', 'getExtensionDir'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('removeDirectory', 'addDirectory', 'getExtensionDir'));
                $fileHandlerMock->expects($this->once())
                        ->method('addDirectory')
                        ->with(PATH_site . 'typo3temp/ext-' . $extKey . '/');
@@ -130,8 +130,8 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function makeAndClearExtensionDirThrowsExceptionOnInvalidPath() {
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('removeDirectory', 'addDirectory'));
-               $languageServiceMock = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService');
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('removeDirectory', 'addDirectory'));
+               $languageServiceMock = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class);
                $fileHandlerMock->_set('languageService', $languageServiceMock);
                $fileHandlerMock->_call('makeAndClearExtensionDir', 'testing123', 'fakepath');
        }
@@ -143,7 +143,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function addDirectoryAddsDirectory() {
                $extDirPath = PATH_site . '/typo3temp/' . uniqid('test-extensions-', TRUE);
                $this->testFilesToDelete[] = $extDirPath;
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('dummy'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('dummy'));
                $fileHandlerMock->_call('addDirectory', $extDirPath);
                $this->assertTrue(is_dir($extDirPath));
        }
@@ -155,7 +155,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function removeDirectoryRemovesDirectory() {
                $extDirPath = PATH_site . '/typo3temp/' . uniqid('test-extensions-', TRUE);
                @mkdir($extDirPath);
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('dummy'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('dummy'));
                $fileHandlerMock->_call('removeDirectory', $extDirPath);
                $this->assertFalse(is_dir($extDirPath));
        }
@@ -205,7 +205,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $extensionData = array(
                        'extKey' => 'test'
                );
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array(
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array(
                        'makeAndClearExtensionDir',
                        'writeEmConfToFile',
                        'extractFilesArrayFromExtensionData',
@@ -271,7 +271,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'mod/doc/'
                );
 
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array(
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array(
                        'makeAndClearExtensionDir',
                        'writeEmConfToFile',
                        'extractFilesArrayFromExtensionData',
@@ -298,7 +298,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'filename2' => 'dummycontent2'
                        )
                );
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('makeAndClearExtensionDir'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('makeAndClearExtensionDir'));
                $extractedFiles = $fileHandlerMock->_call('extractFilesArrayFromExtensionData', $extensionData);
                $this->assertArrayHasKey('filename1', $extractedFiles);
                $this->assertArrayHasKey('filename2', $extractedFiles);
@@ -326,7 +326,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                );
                $rootPath = ($extDirPath = $this->fakedExtensions[$this->createFakeExtension()]['siteAbsPath']);
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('makeAndClearExtensionDir'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('makeAndClearExtensionDir'));
                $fileHandlerMock->_call('writeExtensionFiles', $files, $rootPath);
                $this->assertTrue(file_exists($rootPath . 'ChangeLog'));
        }
@@ -373,7 +373,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'content' => 'FEEL FREE TO ADD SOME DOCUMENTATION HERE'
                        )
                );
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('makeAndClearExtensionDir'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('makeAndClearExtensionDir'));
                $extractedDirectories = $fileHandlerMock->_call('extractDirectoriesFromExtensionData', $files);
                $expected = array(
                        'doc/',
@@ -392,7 +392,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'doc/',
                        'mod/doc/'
                );
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('makeAndClearExtensionDir'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('makeAndClearExtensionDir'));
                $this->assertFalse(is_dir($rootPath . 'doc/'));
                $this->assertFalse(is_dir($rootPath . 'mod/doc/'));
                $fileHandlerMock->_call('createDirectoriesForExtensionFiles', $directories, $rootPath);
@@ -416,9 +416,9 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                );
                $rootPath = $this->fakedExtensions[$extKey]['siteAbsPath'];
-               $emConfUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\EmConfUtility', array('constructEmConf'));
+               $emConfUtilityMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\EmConfUtility::class, array('constructEmConf'));
                $emConfUtilityMock->expects($this->once())->method('constructEmConf')->with($extensionData)->will($this->returnValue(var_export($extensionData['EM_CONF'], TRUE)));
-               $fileHandlerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('makeAndClearExtensionDir'));
+               $fileHandlerMock = $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('makeAndClearExtensionDir'));
                $fileHandlerMock->_set('emConfUtility', $emConfUtilityMock);
                $fileHandlerMock->_call('writeEmConfToFile', $extensionData, $rootPath);
                $this->assertTrue(file_exists($rootPath . 'ext_emconf.php'));
@@ -429,7 +429,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        protected function getPreparedFileHandlingMockForDirectoryCreationTests() {
                /** @var $fileHandlerMock \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility|\PHPUnit_Framework_MockObject_MockObject */
-               $fileHandlerMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility', array('createNestedDirectory', 'getAbsolutePath', 'directoryExists'));
+               $fileHandlerMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class, array('createNestedDirectory', 'getAbsolutePath', 'directoryExists'));
                $fileHandlerMock->expects($this->any())
                        ->method('getAbsolutePath')
                        ->will($this->returnArgument(0));
@@ -530,7 +530,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
                // Build mocked fileHandlingUtility:
                $fileHandlerMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\FileHandlingUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class,
                        array('getAbsoluteExtensionPath', 'getExtensionVersion')
                );
                $fileHandlerMock->expects($this->any())
index 4132f99..62a9b88 100644 (file)
@@ -48,7 +48,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'key' => $this->extensionKey
                );
                $this->installMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
                        array(
                                'isLoaded',
                                'loadExtension',
@@ -66,7 +66,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        '',
                        FALSE
                );
-               $dependencyUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $this->installMock->_set('dependencyUtility', $dependencyUtility);
                $this->installMock->expects($this->any())
                        ->method('enrichExtensionWithDetails')
@@ -116,7 +116,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ->method('processRuntimeDatabaseUpdates')
                        ->with($this->extensionKey);
 
-               $cacheManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+               $cacheManagerMock = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class);
                $cacheManagerMock->expects($this->once())->method('flushCachesInGroup');
                $this->installMock->_set('cacheManager', $cacheManagerMock);
                $this->installMock->install($this->extensionKey);
@@ -126,7 +126,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function installCallsLoadExtension() {
-               $cacheManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+               $cacheManagerMock = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class);
                $cacheManagerMock->expects($this->once())->method('flushCachesInGroup');
                $this->installMock->_set('cacheManager', $cacheManagerMock);
                $this->installMock->expects($this->once())->method('loadExtension');
@@ -138,7 +138,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function installCallsFlushCachesIfClearCacheOnLoadIsSet() {
                $this->extensionData['clearcacheonload'] = TRUE;
-               $cacheManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+               $cacheManagerMock = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class);
                $cacheManagerMock->expects($this->once())->method('flushCaches');
                $this->installMock->_set('cacheManager', $cacheManagerMock);
                $this->installMock->install($this->extensionKey);
@@ -149,7 +149,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function installCallsFlushCachesIfClearCacheOnLoadCamelCasedIsSet() {
                $this->extensionData['clearCacheOnLoad'] = TRUE;
-               $cacheManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+               $cacheManagerMock = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class);
                $cacheManagerMock->expects($this->once())->method('flushCaches');
                $this->installMock->_set('cacheManager', $cacheManagerMock);
                $this->installMock->install($this->extensionKey);
@@ -159,7 +159,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function installationOfAnExtensionWillCallEnsureThatDirectoriesExist() {
-               $cacheManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+               $cacheManagerMock = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class);
                $cacheManagerMock->expects($this->once())->method('flushCachesInGroup');
                $this->installMock->_set('cacheManager', $cacheManagerMock);
                $this->installMock->expects($this->once())->method('ensureConfiguredDirectoriesExist');
@@ -170,7 +170,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function installCallsReloadCaches() {
-               $cacheManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+               $cacheManagerMock = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class);
                $cacheManagerMock->expects($this->once())->method('flushCachesInGroup');
                $this->installMock->_set('cacheManager', $cacheManagerMock);
                $this->installMock->expects($this->once())->method('reloadCaches');
@@ -181,7 +181,7 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function installCallsSaveDefaultConfigurationWithExtensionKey() {
-               $cacheManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+               $cacheManagerMock = $this->getMock(\TYPO3\CMS\Core\Cache\CacheManager::class);
                $cacheManagerMock->expects($this->once())->method('flushCachesInGroup');
                $this->installMock->_set('cacheManager', $cacheManagerMock);
                $this->installMock->expects($this->once())->method('saveDefaultConfiguration')->with('dummy');
@@ -206,13 +206,13 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $fileContent = 'DUMMY TEXT TO COMPARE';
                file_put_contents($extTablesFile, $fileContent);
                $installMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
                        array('updateDbWithExtTablesSql', 'importStaticSqlFile', 'importT3DFile'),
                        array(),
                        '',
                        FALSE
                );
-               $dependencyUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $installMock->_set('dependencyUtility', $dependencyUtility);
 
                $installMock->expects($this->once())->method('updateDbWithExtTablesSql')->with($this->stringStartsWith($fileContent));
@@ -226,13 +226,13 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $extKey = $this->createFakeExtension();
                $extRelPath = 'typo3temp/' . $extKey . '/';
                $installMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
                        array('importStaticSqlFile', 'updateDbWithExtTablesSql', 'importT3DFile'),
                        array(),
                        '',
                        FALSE
                );
-               $dependencyUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $installMock->_set('dependencyUtility', $dependencyUtility);
                $installMock->expects($this->once())->method('importStaticSqlFile')->with($extRelPath);
                $installMock->processDatabaseUpdates($this->fakedExtensions[$extKey]);
@@ -263,13 +263,13 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($absPath . '/Initialisation');
                file_put_contents($absPath . '/Initialisation/' . $fileName, 'DUMMY');
                $installMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
                        array('updateDbWithExtTablesSql', 'importStaticSqlFile', 'importT3DFile'),
                        array(),
                        '',
                        FALSE
                );
-               $dependencyUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $installMock->_set('dependencyUtility', $dependencyUtility);
                $installMock->expects($this->once())->method('importT3DFile')->with($this->fakedExtensions[$extKey]['siteRelPath']);
                $installMock->processDatabaseUpdates($this->fakedExtensions[$extKey]);
@@ -327,13 +327,13 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                )
                        ));
                $installMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
                        array('getRegistry', 'getImportExportUtility'),
                        array(),
                        '',
                        FALSE
                );
-               $dependencyUtility = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DependencyUtility');
+               $dependencyUtility = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility::class);
                $installMock->_set('dependencyUtility', $dependencyUtility);
                $installMock->_set('registry', $registryMock);
                $installMock->expects($this->never())->method('getImportExportUtility');
index 2b60d10..b78f8a6 100644 (file)
@@ -13,7 +13,7 @@ namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Utility;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Cms\Package;
+use TYPO3\CMS\Core\Package;
 
 /**
  * List utility test
@@ -30,17 +30,17 @@ class ListUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
-               $this->subject = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility', array('emitPackagesMayHaveChangedSignal'));
-               $packageManagerMock = $this->getMock('TYPO3\\CMS\\Core\\Package\\PackageManager');
+               $this->subject = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\ListUtility::class, array('emitPackagesMayHaveChangedSignal'));
+               $packageManagerMock = $this->getMock(\TYPO3\CMS\Core\Package\PackageManager::class);
                $packageManagerMock
                                ->expects($this->any())
                                ->method('getActivePackages')
                                ->will($this->returnValue(array(
-                                       'cms' => $this->getMock('TYPO3\\CMS\\Cms\\Package', array(), array(), '', FALSE),
-                                       'lang' => $this->getMock('TYPO3\\CMS\\Cms\\Package', array(), array(), '', FALSE),
-                                       'news' => $this->getMock('TYPO3\\CMS\\Cms\\Package', array(), array(), '', FALSE),
-                                       'saltedpasswords' => $this->getMock('TYPO3\\CMS\\Cms\\Package', array(), array(), '', FALSE),
-                                       'rsaauth' => $this->getMock('TYPO3\\CMS\\Cms\\Package', array(), array(), '', FALSE),
+                                       'cms' => $this->getMock(\TYPO3\CMS\Core\Package::class, array(), array(), '', FALSE),
+                                       'lang' => $this->getMock(\TYPO3\CMS\Core\Package::class, array(), array(), '', FALSE),
+                                       'news' => $this->getMock(\TYPO3\CMS\Core\Package::class, array(), array(), '', FALSE),
+                                       'saltedpasswords' => $this->getMock(\TYPO3\CMS\Core\Package::class, array(), array(), '', FALSE),
+                                       'rsaauth' => $this->getMock(\TYPO3\CMS\Core\Package::class, array(), array(), '', FALSE),
                                )));
                $this->inject($this->subject, 'packageManager', $packageManagerMock);
        }
@@ -170,8 +170,8 @@ class ListUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function enrichExtensionsWithEmConfInformation($extensions, $emConf, $expectedResult) {
-               $this->inject($this->subject, 'extensionRepository', $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository', array('findOneByExtensionKeyAndVersion'), array(), '', FALSE));
-               $emConfUtilityMock = $this->getMock('TYPO3\\CMS\\Extensionmanager\\Utility\\EmConfUtility');
+               $this->inject($this->subject, 'extensionRepository', $this->getAccessibleMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class, array('findOneByExtensionKeyAndVersion'), array(), '', FALSE));
+               $emConfUtilityMock = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\EmConfUtility::class);
                $emConfUtilityMock->expects($this->any())->method('includeEmConf')->will($this->returnValue($emConf));
                $this->inject($this->subject, 'emConfUtility', $emConfUtilityMock);
                $this->assertEquals($expectedResult, $this->subject->enrichExtensionsWithEmConfAndTerInformation($extensions));
index 6c81425..5b340bb 100644 (file)
@@ -2,7 +2,7 @@
 defined('TYPO3_MODE') or die();
 
 // Register extension list update task
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Extensionmanager\\Task\\UpdateExtensionListTask'] = array(
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Extensionmanager\Task\UpdateExtensionListTask::class] = array(
        'extension' => $_EXTKEY,
        'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:task.updateExtensionListTask.name',
        'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:task.updateExtensionListTask.description',
@@ -10,31 +10,31 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Ext
 );
 
 if (TYPO3_MODE === 'BE') {
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'TYPO3\\CMS\\Extensionmanager\\Command\\ExtensionCommandController';
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = \TYPO3\CMS\Extensionmanager\Command\ExtensionCommandController::class;
        if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
                $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
                $signalSlotDispatcher->connect(
-                       'TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService',
+                       \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class,
                        'willInstallExtensions',
-                       'TYPO3\\CMS\\Core\\Package\\PackageManager',
+                       \TYPO3\CMS\Core\Package\PackageManager::class,
                        'scanAvailablePackages'
                );
                $signalSlotDispatcher->connect(
-                       'TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService',
+                       \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class,
                        'hasInstalledExtensions',
-                       'TYPO3\\CMS\\Core\\Package\\PackageManager',
+                       \TYPO3\CMS\Core\Package\PackageManager::class,
                        'updatePackagesForClassLoader'
                );
                $signalSlotDispatcher->connect(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
                        'tablesDefinitionIsBeingBuilt',
-                       'TYPO3\\CMS\\Core\\Cache\\Cache',
+                       \TYPO3\CMS\Core\Cache\Cache::class,
                        'addCachingFrameworkRequiredDatabaseSchemaToTablesDefinition'
                );
                $signalSlotDispatcher->connect(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility',
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
                        'tablesDefinitionIsBeingBuilt',
-                       'TYPO3\\CMS\\Core\\Category\\CategoryRegistry',
+                       \TYPO3\CMS\Core\Category\CategoryRegistry::class,
                        'addExtensionCategoryDatabaseSchemaToTablesDefinition'
                );
        }
index 130f5ff..ddc8ecd 100644 (file)
@@ -24,7 +24,7 @@ if (TYPO3_MODE === 'BE') {
 
        // Register extension status report system
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['Extension Manager'][] =
-               'TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus';
+               \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class;
 }
 
 // Register specific icon for update script button