diff --git a/examples/src/Helper/ExampleHelper.php b/examples/src/Helper/ExampleHelper.php index 01c83137e..b558abba9 100644 --- a/examples/src/Helper/ExampleHelper.php +++ b/examples/src/Helper/ExampleHelper.php @@ -60,4 +60,13 @@ public function output(string $content): void echo '#' . PHP_EOL; echo trim($content) . PHP_EOL . PHP_EOL; } + + public function cleanup(): void + { + $cachePath = sys_get_temp_dir() . '/' . 'fluid-examples'; + if (!is_dir($cachePath)) { + return; + } + (new SimpleFileCache($cachePath))->flush(); + } } diff --git a/tests/Functional/ExamplesTest.php b/tests/Functional/ExamplesTest.php index 359fb1d6e..a86d7bfbc 100644 --- a/tests/Functional/ExamplesTest.php +++ b/tests/Functional/ExamplesTest.php @@ -9,6 +9,8 @@ namespace TYPO3Fluid\Fluid\Tests\Functional; +use TYPO3Fluid\FluidExamples\Helper\ExampleHelper; + final class ExamplesTest extends AbstractFunctionalTestCase { public static function exampleScriptValuesDataProvider(): array @@ -232,4 +234,10 @@ public function exampleScriptValues(string $script, array $expectedOutputs): voi ob_end_clean(); call_user_func($outputCallback, $output); } + + public static function tearDownAfterClass(): void + { + (new ExampleHelper())->cleanup(); + parent::tearDownAfterClass(); + } }