[TASK] Use name-resolution instead of strings where possible: 3
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Core / BootstrapTest.php
index f4f6acc..785d9d3 100644 (file)
@@ -42,9 +42,9 @@ class BootstrapTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function configureObjectManagerRespectsOverridingOfAlternativeObjectRegistrationViaPluginConfiguration() {
                /** @var $objectContainer \TYPO3\CMS\Extbase\Object\Container\Container|\PHPUnit_Framework_MockObject_MockObject */
-               $objectContainer = $this->getMock('TYPO3\CMS\Extbase\Object\Container\Container', array('registerImplementation'));
-               $objectContainer->expects($this->once())->method('registerImplementation')->with('TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface', 'TYPO3\CMS\Extbase\Persistence\Reddis\PersistenceManager');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\CMS\Extbase\Object\Container\Container', $objectContainer);
+               $objectContainer = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\Container::class, array('registerImplementation'));
+               $objectContainer->expects($this->once())->method('registerImplementation')->with(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class, 'TYPO3\CMS\Extbase\Persistence\Reddis\PersistenceManager');
+               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class, $objectContainer);
 
                $frameworkSettings['objects'] = array(
                        'TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface.' => array(
@@ -53,14 +53,14 @@ class BootstrapTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                );
 
                /** @var $configurationManagerMock \TYPO3\CMS\Extbase\Configuration\ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject */
-               $configurationManagerMock = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager', array('getConfiguration'));
+               $configurationManagerMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class, array('getConfiguration'));
                $configurationManagerMock->expects($this->any())->method('getConfiguration')->with('Framework')->will($this->returnValue($frameworkSettings));
 
                /** @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject  $objectManager */
-               $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
 
                /** @var $bootstrapMock \TYPO3\CMS\Extbase\Core\Bootstrap|\PHPUnit_Framework_MockObject_MockObject|\Tx_Phpunit_Interface_AccessibleObject */
-               $bootstrapMock = $this->getAccessibleMock('TYPO3\CMS\Extbase\Core\Bootstrap', array('inject'));
+               $bootstrapMock = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Core\Bootstrap::class, array('inject'));
                $bootstrapMock->_set('objectManager', $objectManager);
                $bootstrapMock->_set('configurationManager', $configurationManagerMock);
                $bootstrapMock->configureObjectManager();