[TASK] Remove further evaluations of pid=-1
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Mvc / Controller / AbstractControllerTest.php
index 1e82999..f9eb282 100644 (file)
@@ -14,39 +14,14 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
 /**
  * Test case
  */
-class AbstractControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class AbstractControllerTest extends UnitTestCase
 {
     /**
-     * @test
-     */
-    public function constructResolvesExtensionnameFromOldStyle()
-    {
-        $className = $this->getUniqueId('Tx_Extbase_Tests_Fixtures_Controller');
-        eval('class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class . ' { function getExtensionName() { return $this->extensionName; } }');
-        $mockController = new $className();
-        $expectedResult = 'Extbase';
-        $actualResult = $mockController->getExtensionName();
-        $this->assertEquals($expectedResult, $actualResult);
-    }
-
-    /**
-     * @test
-     */
-    public function constructResolvesExtensionnameFromNamespaced()
-    {
-        $className = $this->getUniqueId('DummyController');
-        eval('namespace ' . __NAMESPACE__ . '; class ' . $className . ' extends \\' . \TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class . ' { function getExtensionName() { return $this->extensionName; } }');
-        $classNameNamespaced = __NAMESPACE__ . '\\' . $className;
-        $mockController = new $classNameNamespaced();
-        $expectedResult = 'Extbase';
-        $actualResult = $mockController->getExtensionName();
-        $this->assertEquals($expectedResult, $actualResult);
-    }
-
-    /**
      * @return array
      */
     public function addFlashMessageDataProvider()
@@ -116,7 +91,8 @@ class AbstractControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestC
             ->getMock();
         $controllerContext->expects($this->once())->method('getFlashMessageQueue')->will($this->returnValue($flashMessageQueue));
 
-        $controller = $this->getMockForAbstractClass(\TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class,
+        $controller = $this->getMockForAbstractClass(
+            \TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class,
             [],
             '',
             false,
@@ -136,7 +112,8 @@ class AbstractControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestC
     {
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1243258395);
-        $controller = $this->getMockForAbstractClass(\TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class,
+        $controller = $this->getMockForAbstractClass(
+            \TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::class,
             [],
             '',
             false,