Skip to content

Commit

Permalink
Flush component caches between tests (see laravel/framework#44646 and l…
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerkretzmar committed Nov 4, 2022
1 parent bbaca24 commit 13ddcdd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Tests;

use Illuminate\Support\Str;
use Illuminate\View\Component;
use Mockery;
use org\bovigo\vfs\vfsStream;
use PHPUnit\Framework\TestCase as BaseTestCase;
Expand Down Expand Up @@ -42,6 +43,11 @@ protected function tearDown(): void
{
$this->cleanupTempDirectory();
Mockery::close();

Component::flushCache();
Component::forgetComponentsResolver();
Component::forgetFactory();

parent::tearDown();
}

Expand Down

0 comments on commit 13ddcdd

Please sign in to comment.