diff --git a/tests/Functional/AbstractFunctionalTestCase.php b/tests/Functional/AbstractFunctionalTestCase.php index 448bfe4c8..614089a6c 100644 --- a/tests/Functional/AbstractFunctionalTestCase.php +++ b/tests/Functional/AbstractFunctionalTestCase.php @@ -36,14 +36,14 @@ abstract class AbstractFunctionalTestCase extends TestCase */ protected static string $cachePath; - public static function setUpBeforeClass(): void + public function setUp(): void { self::$cachePath = sys_get_temp_dir() . '/' . 'fluid-functional-tests-' . hash('xxh3', __CLASS__); mkdir(self::$cachePath); self::$cache = (new SimpleFileCache(self::$cachePath)); } - public static function tearDownAfterClass(): void + public function tearDown(): void { self::$cache->flush(); rmdir(self::$cachePath); diff --git a/tests/Functional/ViewHelpers/ForViewHelperTest.php b/tests/Functional/ViewHelpers/ForViewHelperTest.php index 92fa60a67..453514c8b 100644 --- a/tests/Functional/ViewHelpers/ForViewHelperTest.php +++ b/tests/Functional/ViewHelpers/ForViewHelperTest.php @@ -11,7 +11,6 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Test; -use TYPO3Fluid\Fluid\Core\ViewHelper\Exception; use TYPO3Fluid\Fluid\Tests\Functional\AbstractFunctionalTestCase; use TYPO3Fluid\Fluid\View\TemplateView; @@ -32,8 +31,8 @@ public function renderThrowsExceptionIfSubjectIsNotTraversable(): void #[Test] public function renderThrowsExceptionIfSubjectIsInvalid(): void { - $this->expectException(Exception::class); - $this->expectExceptionCode(1248728393); + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionCode(1256475113); $view = new TemplateView(); $view->assignMultiple(['value' => new \stdClass()]); $view->getRenderingContext()->setCache(self::$cache);