Skip to content

Commit

Permalink
[9.x] Flushes components cache between tests (#1254)
Browse files Browse the repository at this point in the history
* Flushes components cache between tests

* Bumps components
  • Loading branch information
nunomaduro authored Oct 19, 2022
1 parent d74503b commit fbc847d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
50 changes: 25 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
],
"require": {
"php": "^8.0.2",
"illuminate/auth": "^9.21",
"illuminate/broadcasting": "^9.21",
"illuminate/bus": "^9.21",
"illuminate/cache": "^9.21",
"illuminate/collections": "^9.21",
"illuminate/config": "^9.21",
"illuminate/console": "^9.21",
"illuminate/container": "^9.21",
"illuminate/contracts": "^9.21",
"illuminate/database": "^9.21",
"illuminate/encryption": "^9.21",
"illuminate/events": "^9.21",
"illuminate/filesystem": "^9.21",
"illuminate/hashing": "^9.21",
"illuminate/http": "^9.21",
"illuminate/macroable": "^9.21",
"illuminate/pagination": "^9.21",
"illuminate/pipeline": "^9.21",
"illuminate/queue": "^9.21",
"illuminate/support": "^9.21",
"illuminate/testing": "^9.21",
"illuminate/translation": "^9.21",
"illuminate/validation": "^9.21",
"illuminate/view": "^9.21",
"illuminate/log": "^9.21",
"illuminate/auth": "^9.36.3",
"illuminate/broadcasting": "^9.36.3",
"illuminate/bus": "^9.36.3",
"illuminate/cache": "^9.36.3",
"illuminate/collections": "^9.36.3",
"illuminate/config": "^9.36.3",
"illuminate/console": "^9.36.3",
"illuminate/container": "^9.36.3",
"illuminate/contracts": "^9.36.3",
"illuminate/database": "^9.36.3",
"illuminate/encryption": "^9.36.3",
"illuminate/events": "^9.36.3",
"illuminate/filesystem": "^9.36.3",
"illuminate/hashing": "^9.36.3",
"illuminate/http": "^9.36.3",
"illuminate/macroable": "^9.36.3",
"illuminate/pagination": "^9.36.3",
"illuminate/pipeline": "^9.36.3",
"illuminate/queue": "^9.36.3",
"illuminate/support": "^9.36.3",
"illuminate/testing": "^9.36.3",
"illuminate/translation": "^9.36.3",
"illuminate/validation": "^9.36.3",
"illuminate/view": "^9.36.3",
"illuminate/log": "^9.36.3",
"dragonmantank/cron-expression": "^3.1",
"nikic/fast-route": "^1.3",
"symfony/console": "^6.0",
Expand Down
5 changes: 5 additions & 0 deletions src/Testing/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Support\Facades\Facade;
use Illuminate\View\Component;
use Mockery;
use PHPUnit\Framework\TestCase as BaseTestCase;

Expand Down Expand Up @@ -124,6 +125,10 @@ protected function tearDown(): void
$this->app->flush();
$this->app = null;
}

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

/**
Expand Down

0 comments on commit fbc847d

Please sign in to comment.