[TASK] Shorten the extend class in all unit tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Domain / Repository / FileMountRepositoryTest.php
index 8108fec..8076f84 100644 (file)
@@ -14,31 +14,24 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Domain\Repository;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
 /**
  * Test case
  */
-class FileMountRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
-
-       /**
-        * @var \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository
-        */
-       protected $fixture = NULL;
-
-       protected function setUp() {
-               $this->fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class));
-       }
-
-       /**
-        * @test
-        */
-       public function initializeObjectSetsRespectStoragePidToFalse() {
-               /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */
-               $objectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
-               $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($objectManager);
-               $querySettings = $this->getMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
-               $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
-               $fixture->initializeObject();
-       }
-
+class FileMountRepositoryTest extends UnitTestCase
+{
+    /**
+     * @test
+     */
+    public function initializeObjectSetsRespectStoragePidToFalse()
+    {
+        /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */
+        $objectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
+        $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($objectManager);
+        $querySettings = $this->createMock(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
+        $querySettings->expects($this->once())->method('setRespectStoragePage')->with(false);
+        $objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class)->will($this->returnValue($querySettings));
+        $fixture->initializeObject();
+    }
 }