[TASK] Use name-resolution instead of strings where possible: 3
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Persistence / Generic / QueryFactoryTest.php
index e89e5e6..44a728b 100644 (file)
@@ -40,14 +40,14 @@ class QueryFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $dataMap;
 
        protected function setUp() {
-               $this->dataMap = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', array('getIsStatic', 'getRootLevel'), array('Vendor\\Ext\\Domain\\Model\\ClubMate', 'tx_ext_domain_model_clubmate'));
+               $this->dataMap = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap::class, array('getIsStatic', 'getRootLevel'), array('Vendor\\Ext\\Domain\\Model\\ClubMate', 'tx_ext_domain_model_clubmate'));
 
-               $this->queryFactory = $this->getAccessibleMock('TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory', array('dummy'));
+               $this->queryFactory = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory::class, array('dummy'));
                $this->queryFactory->_set('configurationManager',
-                       $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface')
+                       $this->getMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class)
                );
 
-               $this->dataMapper = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper', array('getDataMap', 'convertClassNameToTableName'));
+               $this->dataMapper = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class, array('getDataMap', 'convertClassNameToTableName'));
                $this->dataMapper->expects($this->any())->method('getDataMap')->will($this->returnValue($this->dataMap));
                $this->queryFactory->_set('dataMapper', $this->dataMapper);
        }
@@ -71,20 +71,20 @@ class QueryFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function createDoesNotRespectStoragePageIfStaticOrRootLevelIsTrue($static, $rootLevel, $expectedResult) {
                /** @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);
                $this->queryFactory->_set('objectManager', $objectManager);
 
                $this->dataMap->expects($this->any())->method('getIsStatic')->will($this->returnValue($static));
                $this->dataMap->expects($this->any())->method('getRootLevel')->will($this->returnValue($rootLevel));
 
-               $query = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface');
+               $query = $this->getMock(\TYPO3\CMS\Extbase\Persistence\QueryInterface::class);
                $objectManager->expects($this->at(0))->method('get')
-                       ->with('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface')
+                       ->with(\TYPO3\CMS\Extbase\Persistence\QueryInterface::class)
                        ->will($this->returnValue($query));
 
                $querySettings = new \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings();
                $objectManager->expects($this->at(1))->method('get')
-                       ->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface')
+                       ->with(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class)
                        ->will($this->returnValue($querySettings));
                $query->expects($this->once())->method('setQuerySettings')->with($querySettings);
                $this->queryFactory->create($this->className);