Current Behavior
When running tests which involve the Formatter, the formatter cache is not cleared at the end of the test run
Steps to Reproduce
- Run a test which does not enable
flarum/markdown
- Write a test which enabled
flarum/markdown
- test the output
- run both tests again, notice that the previous first test now fails
By adding
protected function tearDown(): void
{
parent::tearDown();
resolve(Formatter::class)->flush();
}
To the test class, behaviour is as would be expected.
Expected Behavior
The Formatter cache should be cleared as part of tearDown()
Screenshots
No response
Environment
- Flarum version: x.y.z
- Website URL: http://example.com
- Webserver: [e.g. apache, nginx]
- Hosting environment: [e.g. shared, vps]
- PHP version: x.y.z
- Browser: [e.g. chrome 67, safari 11]
Output of php flarum info
Output of "php flarum info", run this in terminal in your Flarum directory.
Possible Solution
No response
Additional Context
No response
Current Behavior
When running tests which involve the
Formatter, the formatter cache is not cleared at the end of the test runSteps to Reproduce
flarum/markdownflarum/markdownBy adding
To the test class, behaviour is as would be expected.
Expected Behavior
The
Formattercache should be cleared as part oftearDown()Screenshots
No response
Environment
Output of
php flarum infoPossible Solution
No response
Additional Context
No response