[TASK] Use name-resolution instead of strings where possible: 11 67/34867/4
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Dec 2014 13:06:03 +0000 (14:06 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 6 Dec 2014 01:01:26 +0000 (02:01 +0100)
(part for EXT:backend)

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: I49f47b7fb3dbee281af8e166afc3c36662730b54
Resolves: #63477
Releases: master
Reviewed-on: http://review.typo3.org/34867
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
33 files changed:
typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/LoginController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/Element/SuggestElement.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/Module/AbstractFunctionModule.php
typo3/sysext/backend/Classes/Module/ModuleSettings.php
typo3/sysext/backend/Classes/Sprite/SpriteManager.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Classes/View/BackendLayout/DataProviderCollection.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php
typo3/sysext/backend/Tests/Unit/Controller/File/FileControllerTest.php
typo3/sysext/backend/Tests/Unit/Form/Element/InlineElementTest.php
typo3/sysext/backend/Tests/Unit/Form/ElementConditionMatcherTest.php
typo3/sysext/backend/Tests/Unit/Form/FormEngineTest.php
typo3/sysext/backend/Tests/Unit/Module/ModuleControllerTest.php
typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php
typo3/sysext/backend/Tests/Unit/Tree/TreeNodeCollectionTest.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php
typo3/sysext/backend/Tests/Unit/View/BackendLayout/BackendLayoutCollectionTest.php
typo3/sysext/backend/Tests/Unit/View/BackendLayout/DataProviderCollectionTest.php
typo3/sysext/backend/Tests/Unit/View/BackendLayoutViewTest.php
typo3/sysext/backend/Tests/Unit/View/ModuleMenuViewTest.php
typo3/sysext/backend/ext_localconf.php

index eb2792e..dc6b878 100644 (file)
@@ -93,7 +93,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'] as $cacheAction) {
                                $hookObject = GeneralUtility::getUserObj($cacheAction);
                                if (!$hookObject instanceof ClearCacheActionsHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Backend\\Toolbar\\ClearCacheActionsHookInterface', 1228262000);
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Backend\Toolbar\ClearCacheActionsHookInterface::class, 1228262000);
                                }
                                $hookObject->manipulateCacheActions($this->cacheActions, $this->optionValues);
                        }
index 1b15771..d3dac25 100644 (file)
@@ -182,7 +182,7 @@ class MoveElementController {
                                        // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
                                        // SHARED page-TSconfig settings.
                                        $modTSconfig_SHARED = BackendUtility::getModTSconfig($this->page_id, 'mod.SHARED');
-                                       $colPosArray = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $this->page_id, $this);
+                                       $colPosArray = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getColPosListItemsParsed', $this->page_id, $this);
                                        $colPosIds = array();
                                        foreach ($colPosArray as $colPos) {
                                                $colPosIds[] = $colPos[1];
index d0b07b7..fce0cc9 100644 (file)
@@ -176,7 +176,7 @@ class NewContentElementController {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
                                        $hookObject = GeneralUtility::getUserObj($classData);
                                        if (!$hookObject instanceof \TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface) {
-                                               throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Backend\\Wizard\\NewContentElementWizardHookInterface', 1227834741);
+                                               throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface::class, 1227834741);
                                        }
                                        $hookObject->manipulateWizardItems($wizardItems, $this);
                                }
@@ -264,7 +264,7 @@ class NewContentElementController {
                                $code = $GLOBALS['LANG']->getLL('sel2', 1) . '<br /><br />';
 
                                // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
-                               $colPosArray = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $this->id, $this);
+                               $colPosArray = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getColPosListItemsParsed', $this->id, $this);
                                $colPosIds = array_column($colPosArray, 1);
                                // Removing duplicates, if any
                                $colPosList = implode(',', array_unique(array_map('intval', $colPosIds)));
index fd01276..d86a896 100644 (file)
@@ -617,7 +617,7 @@ class LoginController {
         * @return array Modified markers array
         */
        protected function emitRenderLoginFormSignal(array $markers) {
-               $signalArguments = $this->getSignalSlotDispatcher()->dispatch('TYPO3\\CMS\\Backend\\Controller\\LoginController', self::SIGNAL_RenderLoginForm, array($this, $markers));
+               $signalArguments = $this->getSignalSlotDispatcher()->dispatch(\TYPO3\CMS\Backend\Controller\LoginController::class, self::SIGNAL_RenderLoginForm, array($this, $markers));
                return $signalArguments[1];
        }
 
index 8eadcd1..5c49e83 100644 (file)
@@ -556,7 +556,7 @@ class PageLayoutController {
                        $this->topFuncMenu = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'], 'db_layout.php', '');
                        $this->languageMenu = count($this->MOD_MENU['language']) > 1 ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xlf:LGL.language', TRUE) . BackendUtility::getFuncMenu($this->id, 'SET[language]', $this->current_sys_language, $this->MOD_MENU['language'], 'db_layout.php', '') : '';
                        // Find backend layout / coumns
-                       $backendLayout = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getSelectedBackendLayout', $this->id, $this);
+                       $backendLayout = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);
                        if (count($backendLayout['__colPosList'])) {
                                $this->colPosList = implode(',', $backendLayout['__colPosList']);
                        }
@@ -964,7 +964,7 @@ class PageLayoutController {
                                // Setting up the tt_content columns to show:
                                if (is_array($GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'])) {
                                        $colList = array();
-                                       $tcaItems = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $this->id, $this);
+                                       $tcaItems = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getColPosListItemsParsed', $this->id, $this);
                                        foreach ($tcaItems as $temp) {
                                                $colList[] = $temp[1];
                                        }
index a605806..84b11e6 100644 (file)
@@ -150,7 +150,7 @@ class InlineElement {
                                foreach ($tceformsInlineHook as $classData) {
                                        $processObject = GeneralUtility::getUserObj($classData);
                                        if (!$processObject instanceof \TYPO3\CMS\Backend\Form\Element\InlineElementHookInterface) {
-                                               throw new \UnexpectedValueException('$processObject must implement interface TYPO3\\CMS\\Backend\\Form\\Element\\InlineElementHookInterface', 1202072000);
+                                               throw new \UnexpectedValueException('$processObject must implement interface ' . \TYPO3\CMS\Backend\Form\Element\InlineElementHookInterface::class, 1202072000);
                                        }
                                        $processObject->init($this);
                                        $this->hookObjects[] = $processObject;
index 903cf16..34c54d7 100644 (file)
@@ -273,7 +273,7 @@ class SuggestElement {
                        // instantiate the class that should fetch the records for this $queryTable
                        $receiverClassName = $config['receiverClass'];
                        if (!class_exists($receiverClassName)) {
-                               $receiverClassName = 'TYPO3\\CMS\\Backend\\Form\\Element\\SuggestDefaultReceiver';
+                               $receiverClassName = \TYPO3\CMS\Backend\Form\Element\SuggestDefaultReceiver::class;
                        }
                        $receiverObj = GeneralUtility::makeInstance($receiverClassName, $queryTable, $config);
                        $params = array('value' => $search);
index cfe5e29..bf34f62 100644 (file)
@@ -662,11 +662,11 @@ class FormEngine {
                        'inline' => array('appearance', 'behaviour', 'foreign_label', 'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size', 'autoSizeMax', 'symmetric_label', 'readOnly')
                );
                // Create instance of InlineElement only if this a non-IRRE-AJAX call:
-               if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement::') !== 0) {
+               if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], \TYPO3\CMS\Backend\Form\Element\InlineElement::class . '::') !== 0) {
                        $this->inline = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Form\Element\InlineElement::class);
                }
                // Create instance of \TYPO3\CMS\Backend\Form\Element\SuggestElement only if this a non-Suggest-AJAX call:
-               if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\SuggestElement::') !== 0) {
+               if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], \TYPO3\CMS\Backend\Form\Element\SuggestElement::class . '::') !== 0) {
                        $this->suggest = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Form\Element\SuggestElement::class);
                }
                // Prepare user defined objects (if any) for hooks which extend this function:
@@ -2408,7 +2408,7 @@ class FormEngine {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['dbFileIcons'] as $classRef) {
                                $hookObject = GeneralUtility::getUserObj($classRef);
                                if (!$hookObject instanceof DatabaseFileIconsHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Backend\\Form\\DatabaseFileIconsHookInterface', 1290167704);
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Backend\Form\DatabaseFileIconsHookInterface::class, 1290167704);
                                }
                                $additionalParams = array(
                                        'mode' => $mode,
index f091e0e..0562498 100644 (file)
@@ -46,7 +46,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
  * 'web_info',
- * 'TYPO3\\CMS\\Frontend\\Controller\\PageInformationController',
+ * \TYPO3\CMS\Frontend\Controller\PageInformationController::class,
  * NULL,
  * 'LLL:EXT:cms/locallang_tca.xlf:mod_tx_cms_webinfo_page'
  * );
@@ -61,7 +61,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
  * 'web_func',
- * 'TYPO3\\CMS\\WizardCrpages\\Controller\\CreatePagesWizardModuleFunctionController',
+ * \TYPO3\CMS\WizardCrpages\Controller\CreatePagesWizardModuleFunctionController::class
  * NULL,
  * 'LLL:EXT:wizard_crpages/locallang.xlf:wiz_crMany',
  * 'wiz'
index a2a8632..eb647f6 100644 (file)
@@ -160,7 +160,7 @@ class ModuleSettings {
        public function setStoreList($storeList) {
                $this->storeList = is_array($storeList) ? $storeList : GeneralUtility::trimExplode(',', $storeList, TRUE);
                if ($this->writeDevLog) {
-                       GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), 'TYPO3\\CMS\\Backend\\ModuleSettings', 0);
+                       GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), \TYPO3\CMS\Backend\ModuleSettings::class, 0);
                }
        }
 
@@ -174,7 +174,7 @@ class ModuleSettings {
                $storeList = is_array($storeList) ? $storeList : GeneralUtility::trimExplode(',', $storeList, TRUE);
                $this->storeList = array_merge($this->storeList, $storeList);
                if ($this->writeDevLog) {
-                       GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), 'TYPO3\\CMS\\Backend\\ModuleSettings', 0);
+                       GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), \TYPO3\CMS\Backend\ModuleSettings::class, 0);
                }
        }
 
@@ -194,7 +194,7 @@ class ModuleSettings {
                }
                unset($this->storeList[$this->prefix . '_storedSettings']);
                if ($this->writeDevLog) {
-                       GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), 'TYPO3\\CMS\\Backend\\ModuleSettings', 0);
+                       GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), \TYPO3\CMS\Backend\ModuleSettings::class, 0);
                }
        }
 
@@ -290,7 +290,7 @@ class ModuleSettings {
                $writeArray = array();
                if (is_array($storeControl)) {
                        if ($this->writeDevLog) {
-                               GeneralUtility::devLog('Store command: ' . GeneralUtility::arrayToLogString($storeControl), 'TYPO3\\CMS\\Backend\\ModuleSettings', 0);
+                               GeneralUtility::devLog('Store command: ' . GeneralUtility::arrayToLogString($storeControl), \TYPO3\CMS\Backend\ModuleSettings::class, 0);
                        }
                        // Processing LOAD
                        if ($storeControl['LOAD'] and $storeIndex) {
@@ -340,7 +340,7 @@ class ModuleSettings {
                $writeArray[$this->prefix . '_storedSettings'] = serialize($this->storedSettings);
                $GLOBALS['SOBE']->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($GLOBALS['SOBE']->MOD_MENU, $writeArray, $mconfName ? $mconfName : $GLOBALS['SOBE']->MCONF['name'], $this->type);
                if ($this->writeDevLog) {
-                       GeneralUtility::devLog('Settings stored:' . $this->msg, 'TYPO3\\CMS\\Backend\\ModuleSettings', 0);
+                       GeneralUtility::devLog('Settings stored:' . $this->msg, \TYPO3\CMS\Backend\ModuleSettings::class, 0);
                }
        }
 
index 970567f..9be1801 100644 (file)
@@ -83,7 +83,7 @@ class SpriteManager {
                $handler = GeneralUtility::makeInstance($handlerClass);
                // Throw exception if handler class does not implement required interface
                if (!$handler instanceof \TYPO3\CMS\Backend\Sprite\SpriteIconGeneratorInterface) {
-                       throw new \RuntimeException('Class ' . $handlerClass . ' in $TYPO3_CONF_VARS[BE][spriteIconGenerator_handler] ' . ' does not implement TYPO3\\CMS\\Backend\\Sprite\\SpriteIconGeneratorInterface', 1294586333);
+                       throw new \RuntimeException('Class ' . $handlerClass . ' in $TYPO3_CONF_VARS[BE][spriteIconGenerator_handler] ' . ' does not implement ' . \TYPO3\CMS\Backend\Sprite\SpriteIconGeneratorInterface::class, 1294586333);
                }
                // Create temp directory if missing
                if (!is_dir((PATH_site . self::$tempPath))) {
index a02a43b..93f124d 100644 (file)
@@ -911,7 +911,7 @@ function jumpToUrl(URL) {
 
                // Logging: Can't find better place to put it:
                if (TYPO3_DLOG) {
-                       GeneralUtility::devLog('END of BACKEND session', 'TYPO3\\CMS\\Backend\\Template\\DocumentTemplate', 0, array('_FLUSH' => TRUE));
+                       GeneralUtility::devLog('END of BACKEND session', \TYPO3\CMS\Backend\Template\DocumentTemplate::class, 0, array('_FLUSH' => TRUE));
                }
                return $str;
        }
index f938a85..16da726 100644 (file)
@@ -393,7 +393,7 @@ class PagePositionMap {
                $row1 = '';
                $row2 = '';
                $count = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(count($colPosArray), 1);
-               $backendLayout = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getSelectedBackendLayout', $pid, $this);
+               $backendLayout = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getSelectedBackendLayout', $pid, $this);
                if (isset($backendLayout['__config']['backend_layout.'])) {
                        $table = '<div class="t3-gridContainer"><table border="0" cellspacing="0" cellpadding="0" id="typo3-ttContentList">';
                        $colCount = (int)$backendLayout['__config']['backend_layout.']['colCount'];
@@ -403,7 +403,7 @@ class PagePositionMap {
                                $table .= '<col style="width:' . 100 / $colCount . '%"></col>';
                        }
                        $table .= '</colgroup>';
-                       $tcaItems = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $pid, $this);
+                       $tcaItems = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getColPosListItemsParsed', $pid, $this);
                        // Cycle through rows
                        for ($row = 1; $row <= $rowCount; $row++) {
                                $rowConfig = $backendLayout['__config']['backend_layout.']['rows.'][$row . '.'];
index c4094dd..49f474c 100644 (file)
@@ -529,7 +529,7 @@ class BackendUtility {
                        }
                        // Sort fields by the translated value
                        if (count($excludeArrayTable) > 0) {
-                               usort($excludeArrayTable, array('TYPO3\\CMS\\Backend\\Form\\FlexFormsHelper', 'compareArraysByFirstValue'));
+                               usort($excludeArrayTable, array(\TYPO3\CMS\Backend\Form\FlexFormsHelper::class, 'compareArraysByFirstValue'));
                                $finalExcludeArray = array_merge($finalExcludeArray, $excludeArrayTable);
                        }
                }
@@ -2941,7 +2941,7 @@ class BackendUtility {
         */
        static public function setUpdateSignal($set = '', $params = '') {
                $beUser = static::getBackendUserAuthentication();
-               $modData = $beUser->getModuleData('TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal', 'ses');
+               $modData = $beUser->getModuleData(\TYPO3\CMS\Backend\Utility\BackendUtility::class . '::getUpdateSignal', 'ses');
                if ($set) {
                        $modData[$set] = array(
                                'set' => $set,
@@ -2951,7 +2951,7 @@ class BackendUtility {
                        // clear the module data
                        $modData = array();
                }
-               $beUser->pushModuleData('TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal', $modData);
+               $beUser->pushModuleData(\TYPO3\CMS\Backend\Utility\BackendUtility::class . '::getUpdateSignal', $modData);
        }
 
        /**
@@ -2964,7 +2964,7 @@ class BackendUtility {
         */
        static public function getUpdateSignalCode() {
                $signals = array();
-               $modData = static::getBackendUserAuthentication()->getModuleData('TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal', 'ses');
+               $modData = static::getBackendUserAuthentication()->getModuleData(\TYPO3\CMS\Backend\Utility\BackendUtility::class . '::getUpdateSignal', 'ses');
                if (!count($modData)) {
                        return '';
                }
index 8ca6043..df52dbf 100644 (file)
@@ -786,7 +786,7 @@ class IconUtility {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_iconworks.php']['overrideResourceIcon'] as $classRef) {
                                $hookObject = GeneralUtility::getUserObj($classRef);
                                if (!$hookObject instanceof IconUtilityOverrideResourceIconHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Backend\\Utility\\IconUtilityOverrideResourceIconHookInterface', 1393574895);
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Backend\Utility\IconUtilityOverrideResourceIconHookInterface::class, 1393574895);
                                }
                                $hookObject->overrideResourceIcon($resource, $iconName, $options, $overlays);
                        }
@@ -1051,7 +1051,7 @@ class IconUtility {
         * @return array
         */
        static protected function emitBuildSpriteHtmlIconTagSignal(array $tagAttributes, $innerHtml, $tagName) {
-               return static::getSignalSlotDispatcher()->dispatch('TYPO3\\CMS\\Backend\\Utility\\IconUtility', 'buildSpriteHtmlIconTag', array($tagAttributes, $innerHtml, $tagName));
+               return static::getSignalSlotDispatcher()->dispatch(\TYPO3\CMS\Backend\Utility\IconUtility::class, 'buildSpriteHtmlIconTag', array($tagAttributes, $innerHtml, $tagName));
        }
 
        /**
@@ -1062,7 +1062,7 @@ class IconUtility {
         * @param string $cssClasses the CSS classes to be used as a string
         */
        static protected function emitBuildSpriteIconClassesSignal($iconName, &$cssClasses) {
-               static::getSignalSlotDispatcher()->dispatch('TYPO3\\CMS\\Backend\\Utility\\IconUtility', 'buildSpriteIconClasses', array($iconName, &$cssClasses));
+               static::getSignalSlotDispatcher()->dispatch(\TYPO3\CMS\Backend\Utility\IconUtility::class, 'buildSpriteIconClasses', array($iconName, &$cssClasses));
        }
 
        /**
index 63bab53..117cfb6 100644 (file)
@@ -57,7 +57,7 @@ class DataProviderCollection implements \TYPO3\CMS\Core\SingletonInterface {
 
                if (!$dataProvider instanceof DataProviderInterface) {
                        throw new \LogicException(
-                               $className . ' must implement interface TYPO3\\CMS\\Backend\\View\\BackendLayout\\DataProviderInterface',
+                               $className . ' must implement interface ' . \TYPO3\CMS\Backend\View\BackendLayout\DataProviderInterface::class,
                                1381269811
                        );
                }
index 41ef5b7..af1836f 100644 (file)
@@ -60,7 +60,7 @@ class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface {
 
                $dataProviderCollection->add(
                        'default',
-                       'TYPO3\\CMS\\Backend\\View\\BackendLayout\\DefaultDataProvider'
+                       \TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider::class
                );
 
                if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider'])) {
index 1ce212d..0b1c421 100644 (file)
@@ -549,7 +549,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        // Add new-icon link, header:
                                        $newP = $this->newContentElementOnClick($id, $key, $lP);
                                        $colTitle = BackendUtility::getProcessedValue('tt_content', 'colPos', $key);
-                                       $tcaItems = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $id, $this);
+                                       $tcaItems = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getColPosListItemsParsed', $id, $this);
                                        foreach ($tcaItems as $item) {
                                                if ($item[1] == $key) {
                                                        $colTitle = $this->getLanguageService()->sL($item[0]);
@@ -1451,7 +1451,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        foreach ($drawItemHooks as $hookClass) {
                                $hookObject = GeneralUtility::getUserObj($hookClass);
                                if (!$hookObject instanceof PageLayoutViewDrawItemHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Backend\\View\\PageLayoutViewDrawItemHookInterface', 1218547409);
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface::class, 1218547409);
                                }
                                $hookObject->preProcess($this, $drawItem, $outHeader, $out, $row);
                        }
index 944d413..6898780 100644 (file)
@@ -52,7 +52,7 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $GLOBALS['TCA'][$this->testTableName] = array('ctrl' => array());
                $GLOBALS[$this->testGlobalNamespace] = array();
                $this->setUpBackend();
-               $this->matchCondition = $this->getMock('TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher', array('determineRootline'), array(), '', FALSE);
+               $this->matchCondition = $this->getMock(\TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::class, array('determineRootline'), array(), '', FALSE);
        }
 
        /**
@@ -71,7 +71,7 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Set up database mock
         */
        private function setUpDatabaseMockForDeterminePageId() {
-               $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('exec_SELECTquery', 'sql_fetch_assoc', 'sql_free_result'));
+               $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array('exec_SELECTquery', 'sql_fetch_assoc', 'sql_free_result'));
                $GLOBALS['TYPO3_DB']->expects($this->any())->method('exec_SELECTquery')->will($this->returnCallback(array($this, 'determinePageIdByRecordDatabaseExecuteCallback')));
                $GLOBALS['TYPO3_DB']->expects($this->any())->method('sql_fetch_assoc')->will($this->returnCallback(array($this, 'determinePageIdByRecordDatabaseFetchCallback')));
        }
@@ -582,7 +582,7 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function treeLevelConditionMatchesCurrentPageIdWhileEditingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array(), array(), '', FALSE);
+               $GLOBALS['SOBE'] = $this->getMock(\TYPO3\CMS\Backend\Controller\EditDocumentController::class, array(), array(), '', FALSE);
                $GLOBALS['SOBE']->elementsData = array(
                        array(
                                'table' => 'pages',
@@ -604,7 +604,7 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function treeLevelConditionMatchesCurrentPageIdWhileSavingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array(), array(), '', FALSE);
+               $GLOBALS['SOBE'] = $this->getMock(\TYPO3\CMS\Backend\Controller\EditDocumentController::class, array(), array(), '', FALSE);
                $GLOBALS['SOBE']->elementsData = array(
                        array(
                                'table' => 'pages',
@@ -677,7 +677,7 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function PIDupinRootlineConditionMatchesCurrentPageIdWhileEditingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array(), array(), '', FALSE);
+               $GLOBALS['SOBE'] = $this->getMock(\TYPO3\CMS\Backend\Controller\EditDocumentController::class, array(), array(), '', FALSE);
                $GLOBALS['SOBE']->elementsData = array(
                        array(
                                'table' => 'pages',
@@ -699,7 +699,7 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function PIDupinRootlineConditionMatchesCurrentPageIdWhileSavingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array(), array(), '', FALSE);
+               $GLOBALS['SOBE'] = $this->getMock(\TYPO3\CMS\Backend\Controller\EditDocumentController::class, array(), array(), '', FALSE);
                $GLOBALS['SOBE']->elementsData = array(
                        array(
                                'table' => 'pages',
index 950310d..8b74a13 100644 (file)
@@ -48,9 +48,9 @@ class FileControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Sets up this test case.
         */
        protected function setUp() {
-               $this->fileResourceMock = $this->getMock('TYPO3\\CMS\\Core\\Resource\\File', array('toArray', 'getModificationTime', 'getExtension'), array(), '', FALSE);
-               $this->folderResourceMock = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Folder', array('getIdentifier'), array(), '', FALSE);
-               $this->mockFileProcessor = $this->getMock('TYPO3\\CMS\\Core\\Utility\\File\ExtendedFileUtility', array('getErrorMessages'), array(), '', FALSE);
+               $this->fileResourceMock = $this->getMock(\TYPO3\CMS\Core\Resource\File::class, array('toArray', 'getModificationTime', 'getExtension'), array(), '', FALSE);
+               $this->folderResourceMock = $this->getMock(\TYPO3\CMS\Core\Resource\Folder::class, array('getIdentifier'), array(), '', FALSE);
+               $this->mockFileProcessor = $this->getMock(\TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::class, array('getErrorMessages'), array(), '', FALSE);
 
                $this->fileResourceMock->expects($this->any())->method('toArray')->will($this->returnValue(array('id' => 'foo')));
                $this->fileResourceMock->expects($this->any())->method('getModificationTime')->will($this->returnValue(123456789));
@@ -61,7 +61,7 @@ class FileControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function flattenResultDataValueFlattensFileAndFolderResourcesButReturnsAnythingElseAsIs() {
-               $this->fileController = $this->getAccessibleMock('TYPO3\\CMS\\Backend\\Controller\\File\\FileController', array('dummy'));
+               $this->fileController = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, array('dummy'));
 
                $this->folderResourceMock->expects($this->once())->method('getIdentifier')->will($this->returnValue('bar'));
 
@@ -89,8 +89,8 @@ class FileControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function processAjaxRequestDeleteProcessActuallyDoesNotChangeFileData() {
-               $this->fileController = $this->getAccessibleMock('TYPO3\\CMS\\Backend\\Controller\\File\\FileController', array('init', 'main'));
-               $this->mockAjaxRequestHandler = $this->getMock('TYPO3\\CMS\\Core\\Http\\AjaxRequestHandler', array('addContent', 'setContentFormat'), array(), '', FALSE);
+               $this->fileController = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, array('init', 'main'));
+               $this->mockAjaxRequestHandler = $this->getMock(\TYPO3\CMS\Core\Http\AjaxRequestHandler::class, array('addContent', 'setContentFormat'), array(), '', FALSE);
 
                $fileData = array('delete' => array(TRUE));
                $this->fileController->_set('fileProcessor', $this->mockFileProcessor);
@@ -109,8 +109,8 @@ class FileControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function processAjaxRequestEditFileProcessActuallyDoesNotChangeFileData() {
-               $this->fileController = $this->getAccessibleMock('TYPO3\CMS\\Backend\\Controller\\File\\FileController', array('init', 'main'));
-               $this->mockAjaxRequestHandler = $this->getMock('TYPO3\\CMS\\Core\\Http\\AjaxRequestHandler', array('addContent', 'setContentFormat'), array(), '', FALSE);
+               $this->fileController = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, array('init', 'main'));
+               $this->mockAjaxRequestHandler = $this->getMock(\TYPO3\CMS\Core\Http\AjaxRequestHandler::class, array('addContent', 'setContentFormat'), array(), '', FALSE);
 
                $fileData = array('editfile' => array(TRUE));
                $this->fileController->_set('fileProcessor', $this->mockFileProcessor);
@@ -129,8 +129,8 @@ class FileControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function processAjaxRequestUnzipProcessActuallyDoesNotChangeFileData() {
-               $this->fileController = $this->getAccessibleMock('TYPO3\\CMS\\Backend\\Controller\\File\\FileController', array('init', 'main'));
-               $this->mockAjaxRequestHandler = $this->getMock('TYPO3\\CMS\\Core\\Http\\AjaxRequestHandler', array('addContent', 'setContentFormat'), array(), '', FALSE);
+               $this->fileController = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, array('init', 'main'));
+               $this->mockAjaxRequestHandler = $this->getMock(\TYPO3\CMS\Core\Http\AjaxRequestHandler::class, array('addContent', 'setContentFormat'), array(), '', FALSE);
 
                $fileData = array('unzip' => array(TRUE));
                $this->fileController->_set('fileProcessor', $this->mockFileProcessor);
@@ -149,8 +149,8 @@ class FileControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function processAjaxRequestUploadProcess() {
-               $this->fileController = $this->getAccessibleMock('TYPO3\\CMS\Backend\\Controller\\File\\FileController', array('init', 'main'));
-               $this->mockAjaxRequestHandler = $this->getMock('TYPO3\\CMS\\Core\\Http\\AjaxRequestHandler', array('addContent', 'setContentFormat'), array(), '', FALSE);
+               $this->fileController = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, array('init', 'main'));
+               $this->mockAjaxRequestHandler = $this->getMock(\TYPO3\CMS\Core\Http\AjaxRequestHandler::class, array('addContent', 'setContentFormat'), array(), '', FALSE);
 
                $fileData = array('upload' => array(array($this->fileResourceMock)));
                $result = array('upload' => array(array(
index a99cd5e..eb1f63f 100644 (file)
@@ -31,7 +31,7 @@ class InlineElementTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected function setUp() {
                // @todo Use $this->buildAccessibleProxy() if properties are protected
                $this->subject = new \TYPO3\CMS\Backend\Form\Element\InlineElement();
-               $this->subject->fObj = $this->getMock('TYPO3\\CMS\\Backend\\Form\\FormEngine', array(), array(), '', FALSE);
+               $this->subject->fObj = $this->getMock(\TYPO3\CMS\Backend\Form\FormEngine::class, array(), array(), '', FALSE);
        }
 
        /**
index 9f8d1be..a18bb50 100644 (file)
@@ -339,7 +339,7 @@ class ElementConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function matchHideForNonAdminsReturnsTrueIfBackendUserIsAdmin() {
                /** @var $backendUserMock \TYPO3\CMS\Core\Authentication\BackendUserAuthentication|\PHPUnit_Framework_MockObject_MockObject */
-               $backendUserMock = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $backendUserMock = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
                $backendUserMock
                        ->expects($this->once())
                        ->method('isAdmin')
@@ -353,7 +353,7 @@ class ElementConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function matchHideForNonAdminsReturnsFalseIfBackendUserIsNotAdmin() {
                /** @var $backendUserMock \TYPO3\CMS\Core\Authentication\BackendUserAuthentication|\PHPUnit_Framework_MockObject_MockObject */
-               $backendUserMock = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $backendUserMock = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
                $backendUserMock
                        ->expects($this->once())
                        ->method('isAdmin')
@@ -367,7 +367,7 @@ class ElementConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function matchHideL10NSiblingsExceptAdminReturnsTrueIfBackendUserIsAdmin() {
                /** @var $backendUserMock \TYPO3\CMS\Core\Authentication\BackendUserAuthentication|\PHPUnit_Framework_MockObject_MockObject */
-               $backendUserMock = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $backendUserMock = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
                $backendUserMock
                        ->expects($this->once())
                        ->method('isAdmin')
@@ -381,7 +381,7 @@ class ElementConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function matchHideL10NSiblingsExceptAdminReturnsFalseIfBackendUserIsNotAdmin() {
                /** @var $backendUserMock \TYPO3\CMS\Core\Authentication\BackendUserAuthentication|\PHPUnit_Framework_MockObject_MockObject */
-               $backendUserMock = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $backendUserMock = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
                $backendUserMock
                        ->expects($this->once())
                        ->method('isAdmin')
index b6a953c..72df912 100644 (file)
@@ -30,7 +30,7 @@ class FormEngineTest extends UnitTestCase {
         * Sets up this test case.
         */
        protected function setUp() {
-               $this->subject = $this->getMock('TYPO3\\CMS\\Backend\\Form\\FormEngine', array('dummy'), array(), '', FALSE);
+               $this->subject = $this->getMock(\TYPO3\CMS\Backend\Form\FormEngine::class, array('dummy'), array(), '', FALSE);
        }
 
        /**
index 82d711e..5aee283 100644 (file)
@@ -27,7 +27,7 @@ class ModuleControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $moduleController;
 
        protected function setUp() {
-               $this->moduleController = $this->getAccessibleMock('TYPO3\\CMS\\Backend\\Module\\ModuleController', array('getLanguageService'), array(), '', FALSE);
+               $this->moduleController = $this->getAccessibleMock(\TYPO3\CMS\Backend\Module\ModuleController::class, array('getLanguageService'), array(), '', FALSE);
        }
 
        /**
@@ -35,7 +35,7 @@ class ModuleControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function createEntryFromRawDataGeneratesMenuEntry() {
                $entry = $this->moduleController->_call('createEntryFromRawData', array());
-               $this->assertInstanceOf('TYPO3\\CMS\\Backend\\Domain\\Model\\Module\\BackendModule', $entry);
+               $this->assertInstanceOf(\TYPO3\CMS\Backend\Domain\Model\Module\BackendModule::class, $entry);
        }
 
        /**
@@ -54,7 +54,7 @@ class ModuleControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        'navigationComponentId' => 'navigationComponentIdTest'
                );
 
-               $languageServiceMock = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array(), array(), '', FALSE);
+               $languageServiceMock = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class, array(), array(), '', FALSE);
                $languageServiceMock->expects($this->once())->method('sL')->will($this->returnValue('titleTest'));
                $this->moduleController->expects($this->once())->method('getLanguageService')->will($this->returnValue($languageServiceMock));
 
index ea93155..f5eaff4 100644 (file)
@@ -33,7 +33,7 @@ class DataProviderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'] = array();
                $GLOBALS['LOCKED_RECORDS'] = array();
                /** @var $backendUserMock \TYPO3\CMS\Core\Authentication\BackendUserAuthentication|\PHPUnit_Framework_MockObject_MockObject */
-               $backendUserMock = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array(), array(), '', FALSE);
+               $backendUserMock = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class, array(), array(), '', FALSE);
                $GLOBALS['BE_USER'] = $backendUserMock;
 
                $this->subject = new \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider();
index 67b657a..8a89566 100644 (file)
@@ -26,12 +26,12 @@ class TreeNodeCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function sortNodes() {
                $nodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection(array(
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 15),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 25),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 5),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 2),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 150),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 67)
+                       array('serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 15),
+                       array('serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 25),
+                       array('serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 5),
+                       array('serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 2),
+                       array('serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 150),
+                       array('serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 67)
                ));
                $nodeCollection->asort();
                $expected = array(2, 5, 15, 25, 67, 150);
index 2cd3954..e7f777c 100644 (file)
@@ -566,7 +566,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                );
                // Stub LanguageService and let sL() return the same value that came in again
-               $GLOBALS['LANG'] = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array(), array(), '', FALSE);
+               $GLOBALS['LANG'] = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class, array(), array(), '', FALSE);
                $GLOBALS['LANG']->expects($this->any())->method('sL')
                        ->will($this->returnCallback(
                                function($name) {
@@ -599,9 +599,9 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                );
                // Stub LanguageService and let sL() return the same value that came in again
-               $GLOBALS['LANG'] = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array(), array(), '', FALSE);
+               $GLOBALS['LANG'] = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class, array(), array(), '', FALSE);
                $GLOBALS['LANG']->charSet = 'utf-8';
-               $GLOBALS['LANG']->csConvObj = $this->getMock('TYPO3\\CMS\\Core\\Charset\\CharsetConverter');
+               $GLOBALS['LANG']->csConvObj = $this->getMock(\TYPO3\CMS\Core\Charset\CharsetConverter::class);
                $GLOBALS['LANG']->expects($this->any())->method('sL')
                        ->will($this->returnCallback(
                                function($name) {
@@ -639,9 +639,9 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                );
                // Stub LanguageService and let sL() return the same value that came in again
-               $GLOBALS['LANG'] = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array(), array(), '', FALSE);
+               $GLOBALS['LANG'] = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class, array(), array(), '', FALSE);
                $GLOBALS['LANG']->charSet = 'utf-8';
-               $GLOBALS['LANG']->csConvObj = $this->getMock('TYPO3\\CMS\\Core\\Charset\\CharsetConverter');
+               $GLOBALS['LANG']->csConvObj = $this->getMock(\TYPO3\CMS\Core\Charset\CharsetConverter::class);
                $GLOBALS['LANG']->expects($this->any())->method('sL')
                        ->will($this->returnCallback(
                                function($name) {
@@ -778,7 +778,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $GLOBALS['TCA'] = $tca;
 
                // Stub LanguageService and let sL() return the same value that came in again
-               $GLOBALS['LANG'] = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array(), array(), '', FALSE);
+               $GLOBALS['LANG'] = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class, array(), array(), '', FALSE);
                $GLOBALS['LANG']->expects($this->any())->method('sL')
                        ->will($this->returnCallback(
                                function($name) {
@@ -882,7 +882,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
 
                // Stub LanguageService and let sL() return the same value that came in again
-               $GLOBALS['LANG'] = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService', array(), array(), '', FALSE);
+               $GLOBALS['LANG'] = $this->getMock(\TYPO3\CMS\Lang\LanguageService::class, array(), array(), '', FALSE);
                $GLOBALS['LANG']->expects($this->any())->method('sL')
                        ->will($this->returnCallback(
                                function($name) {
@@ -1141,7 +1141,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function replaceMarkersInWhereClauseReturnsValidWhereClause($whereClause, $tsConfig, $expected) {
                // Mock TYPO3_DB and let it return same values that came in
-               $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array(), array(), '', FALSE);
+               $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array(), array(), '', FALSE);
                $GLOBALS['TYPO3_DB']->expects($this->any())->method('quoteStr')
                        ->will($this->returnCallback(
                                function($quoteStr, $table) {
@@ -1167,7 +1167,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function replaceMarkersInWhereClauseCleansIdList() {
-               $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array(), array(), '', FALSE);
+               $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array(), array(), '', FALSE);
                $GLOBALS['TYPO3_DB']->expects($this->once())->method('cleanIntList')->with('1,a,2,b,3,c');
                $where = ' AND dummytable.uid IN (###PAGE_TSCONFIG_IDLIST###)';
                $tsConfig = array(
@@ -1195,7 +1195,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        )
                );
 
-               $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array(), array(), '', FALSE);
+               $GLOBALS['BE_USER'] = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class, array(), array(), '', FALSE);
                $GLOBALS['BE_USER']->expects($this->at(0))->method('getTSConfig')->will($this->returnValue($completeConfiguration));
                $GLOBALS['BE_USER']->expects($this->at(1))->method('getTSConfig')->will($this->returnValue(array('value' => NULL, 'properties' => NULL)));
 
@@ -1353,11 +1353,11 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function replaceL10nModeFieldsReplacesFields($table, $row, $tca, $originalRow, $expected) {
                $GLOBALS['TCA'] = $tca;
-               $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection');
+               $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class);
                $GLOBALS['TYPO3_DB']->expects($this->any())->method('exec_SELECTgetSingleRow')->will($this->returnValue($originalRow));
 
                /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\TYPO3\CMS\Backend\Utility\BackendUtility $subject */
-               $subject = $this->getAccessibleMock('TYPO3\\CMS\\Backend\\Utility\\BackendUtility', array('dummy'));
+               $subject = $this->getAccessibleMock(\TYPO3\CMS\Backend\Utility\BackendUtility::class, array('dummy'));
                $this->assertSame($expected, $subject->_call('replaceL10nModeFields', $table, $row));
        }
 }
index ff03884..804abcd 100644 (file)
@@ -74,7 +74,7 @@ class IconUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return \TYPO3\CMS\Core\Resource\Folder
         */
        protected function getTestSubjectFolderObject($identifier) {
-               $mockedStorage = $this->getMock('TYPO3\\CMS\\Core\\Resource\\ResourceStorage', array(), array(), '', FALSE);
+               $mockedStorage = $this->getMock(\TYPO3\CMS\Core\Resource\ResourceStorage::class, array(), array(), '', FALSE);
                $mockedStorage->expects($this->any())->method('getRootLevelFolder')->will($this->returnValue(
                        new \TYPO3\CMS\Core\Resource\Folder($mockedStorage, '/', '/')
                ));
@@ -89,8 +89,8 @@ class IconUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return \TYPO3\CMS\Core\Resource\File
         */
        protected function getTestSubjectFileObject($extension) {
-               $mockedStorage = $this->getMock('TYPO3\\CMS\\Core\\Resource\\ResourceStorage', array(), array(), '', FALSE);
-               $mockedFile = $this->getMock('TYPO3\\CMS\\Core\\Resource\\File', array(), array(array(), $mockedStorage));
+               $mockedStorage = $this->getMock(\TYPO3\CMS\Core\Resource\ResourceStorage::class, array(), array(), '', FALSE);
+               $mockedFile = $this->getMock(\TYPO3\CMS\Core\Resource\File::class, array(), array(array(), $mockedStorage));
                $mockedFile->expects($this->once())->method('getExtension')->will($this->returnValue($extension));
 
                return $mockedFile;
@@ -755,7 +755,7 @@ class IconUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
                $classReference = uniqid('user_overrideResourceIconHook');
                $folderObject = $this->getTestSubjectFolderObject('/test');
-               $hookMock = $this->getMock('TYPO3\\CMS\\Backend\\Utility\\IconUtilityOverrideResourceIconHookInterface', array('overrideResourceIcon'), array(), $classReference);
+               $hookMock = $this->getMock(\TYPO3\CMS\Backend\Utility\IconUtilityOverrideResourceIconHookInterface::class, array('overrideResourceIcon'), array(), $classReference);
                $hookMock->expects($this->once())->method('overrideResourceIcon');
                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_iconworks.php']['overrideResourceIcon'][$classReference] = $classReference;
                $GLOBALS['T3_VAR']['getUserObj'][$classReference] = $hookMock;
index a05812b..7ab4c95 100644 (file)
@@ -48,7 +48,7 @@ class BackendLayoutCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $identifier = uniqid('identifier');
                $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
                $backendLayoutIdentifier = uniqid('identifier__');
-               $backendLayoutMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout', array('getIdentifier'), array(), '', FALSE);
+               $backendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array('getIdentifier'), array(), '', FALSE);
                $backendLayoutMock->expects($this->once())->method('getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
 
                $backendLayoutCollection->add($backendLayoutMock);
@@ -62,9 +62,9 @@ class BackendLayoutCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $identifier = uniqid('identifier');
                $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
                $backendLayoutIdentifier = uniqid('identifier');
-               $firstBackendLayoutMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout', array('getIdentifier'), array(), '', FALSE);
+               $firstBackendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array('getIdentifier'), array(), '', FALSE);
                $firstBackendLayoutMock->expects($this->once())->method('getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
-               $secondBackendLayoutMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout', array('getIdentifier'), array(), '', FALSE);
+               $secondBackendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array('getIdentifier'), array(), '', FALSE);
                $secondBackendLayoutMock->expects($this->once())->method('getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
 
                $backendLayoutCollection->add($firstBackendLayoutMock);
@@ -78,7 +78,7 @@ class BackendLayoutCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $identifier = uniqid('identifier');
                $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
                $backendLayoutIdentifier = uniqid('identifier');
-               $backendLayoutMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout', array('getIdentifier'), array(), '', FALSE);
+               $backendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array('getIdentifier'), array(), '', FALSE);
                $backendLayoutMock->expects($this->once())->method('getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
 
                $backendLayoutCollection->add($backendLayoutMock);
index 94cd2db..92d2c36 100644 (file)
@@ -61,8 +61,8 @@ class DataProviderCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function defaultBackendLayoutIsFound() {
                $backendLayoutIdentifier = uniqid('identifier');
 
-               $dataProviderMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\DefaultDataProvider', array('getBackendLayout'), array(), '', FALSE);
-               $backendLayoutMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout', array('getIdentifier'), array(), '', FALSE);
+               $dataProviderMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider::class, array('getBackendLayout'), array(), '', FALSE);
+               $backendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array('getIdentifier'), array(), '', FALSE);
                $backendLayoutMock->expects($this->any())->method('getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
                $dataProviderMock->expects($this->once())->method('getBackendLayout')->will($this->returnValue($backendLayoutMock));
 
@@ -80,8 +80,8 @@ class DataProviderCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $dataProviderIdentifier = uniqid('custom');
                $backendLayoutIdentifier = uniqid('identifier');
 
-               $dataProviderMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\DefaultDataProvider', array('getBackendLayout'), array(), '', FALSE);
-               $backendLayoutMock = $this->getMock('TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout', array('getIdentifier'), array(), '', FALSE);
+               $dataProviderMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider::class, array('getBackendLayout'), array(), '', FALSE);
+               $backendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array('getIdentifier'), array(), '', FALSE);
                $backendLayoutMock->expects($this->any())->method('getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
                $dataProviderMock->expects($this->once())->method('getBackendLayout')->will($this->returnValue($backendLayoutMock));
 
index 41d8d30..2ed25c4 100644 (file)
@@ -31,7 +31,7 @@ class BackendLayoutViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        protected function setUp() {
                $this->backendLayoutView = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Backend\\View\\BackendLayoutView',
+                       \TYPO3\CMS\Backend\View\BackendLayoutView::class,
                        array('getPage', 'getRootLine'),
                        array(), '', FALSE
                );
index d9524f4..d8d4016 100644 (file)
@@ -25,7 +25,7 @@ class ModuleMenuViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function unsetHiddenModulesUnsetsHiddenModules() {
                /** @var \TYPO3\CMS\Backend\View\ModuleMenuView|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface $moduleMenuViewMock */
                $moduleMenuViewMock = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Backend\\View\\ModuleMenuView',
+                       \TYPO3\CMS\Backend\View\ModuleMenuView::class,
                        array('dummy'),
                        array(),
                        '',
@@ -59,7 +59,7 @@ class ModuleMenuViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                );
 
-               $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array(), array(), '', FALSE);
+               $GLOBALS['BE_USER'] = $this->getMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class, array(), array(), '', FALSE);
                $GLOBALS['BE_USER']->expects($this->any())->method('getTSConfig')->will($this->returnValue($userTsFixture));
 
                $expectedResult = array(
index 54f6107..32879a2 100644 (file)
@@ -3,17 +3,17 @@ defined('TYPO3_MODE') or die();
 
 if (TYPO3_MODE === 'BE') {
        \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect(
-               'TYPO3\\CMS\\Core\\Tree\\TableConfiguration\\TableConfiguration\\DatabaseTreeDataProvider',
+               \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider::class,
                \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider::SIGNAL_PostProcessTreeData,
-               'TYPO3\\CMS\\Backend\\Security\\CategoryPermissionsAspect',
+               \TYPO3\CMS\Backend\Security\CategoryPermissionsAspect::class,
                'addUserPermissionsToCategoryTreeData'
        );
 
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = 'TYPO3\\CMS\\Backend\\Backend\\ToolbarItems\\ClearCacheToolbarItem';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = 'TYPO3\\CMS\\Backend\\Backend\\ToolbarItems\\HelpToolbarItem';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = 'TYPO3\\CMS\\Backend\\Backend\\ToolbarItems\\LiveSearchToolbarItem';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = 'TYPO3\\CMS\\Backend\\Backend\\ToolbarItems\\ShortcutToolbarItem';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = 'TYPO3\\CMS\\Backend\\Backend\\ToolbarItems\\UserToolbarItem';
+       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::class;
+       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = \TYPO3\CMS\Backend\Backend\ToolbarItems\HelpToolbarItem::class;
+       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = \TYPO3\CMS\Backend\Backend\ToolbarItems\LiveSearchToolbarItem::class;
+       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ShortcutToolbarItem::class;
+       $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][] = \TYPO3\CMS\Backend\Backend\ToolbarItems\UserToolbarItem::class;
 }
 
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default'] = 'TYPO3\\CMS\\Core\\FrontendEditing\\FrontendEditingController';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default'] = \TYPO3\CMS\Core\FrontendEditing\FrontendEditingController::class;