diff --git a/framework/core/tests/integration/extenders/FormatterTest.php b/framework/core/tests/integration/extenders/FormatterTest.php index 2dfd66554..72af5c8c1 100644 --- a/framework/core/tests/integration/extenders/FormatterTest.php +++ b/framework/core/tests/integration/extenders/FormatterTest.php @@ -11,16 +11,16 @@ namespace Flarum\Tests\integration\extenders; use Flarum\Extend; use Flarum\Formatter\Formatter; +use Flarum\Testing\integration\RefreshesFormatterCache; use Flarum\Testing\integration\TestCase; class FormatterTest extends TestCase { + use RefreshesFormatterCache; + protected function getFormatter() { - $formatter = $this->app()->getContainer()->make(Formatter::class); - $formatter->flush(); - - return $formatter; + return $this->app()->getContainer()->make(Formatter::class); } /** diff --git a/php-packages/testing/src/integration/RefreshesFormatterCache.php b/php-packages/testing/src/integration/RefreshesFormatterCache.php new file mode 100644 index 000000000..bb79c9911 --- /dev/null +++ b/php-packages/testing/src/integration/RefreshesFormatterCache.php @@ -0,0 +1,22 @@ +app()->getContainer()->make(Formatter::class)->flush(); + + parent::tearDown(); + } +}