File tree Expand file tree Collapse file tree 1 file changed +6
-27
lines changed Expand file tree Collapse file tree 1 file changed +6
-27
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,12 @@ You can modify this file to add custom logic:
2525 (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
2626 }
2727
28- + if (isset($_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'])) {
29- + // executes the "php bin/console cache:clear" command
30- + passthru(sprintf(
31- + 'APP_ENV=%s php "%s/../bin/console" cache:clear --no-warmup',
32- + $_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'],
33- + __DIR__
34- + ));
35- + }
28+ + // executes the "php bin/console cache:clear" command
29+ + passthru(sprintf(
30+ + 'APP_ENV=%s php "%s/../bin/console" cache:clear --no-warmup',
31+ + $_ENV['APP_ENV'],
32+ + __DIR__
33+ + ));
3634
3735 .. note ::
3836
@@ -48,22 +46,3 @@ You can modify this file to add custom logic:
4846 >
4947 <!-- ... -->
5048 </phpunit >
51-
52- Now, you can update the ``phpunit.xml.dist `` file to declare the custom
53- environment variable introduced to ``tests/bootstrap.php ``:
54-
55- .. code-block :: xml
56-
57- <!-- phpunit.xml.dist -->
58- <?xml version =" 1.0" encoding =" UTF-8" ?>
59- <phpunit >
60- <php >
61- <env name =" BOOTSTRAP_CLEAR_CACHE_ENV" value =" test" />
62- <!-- ... -->
63- </php >
64-
65- <!-- ... -->
66- </phpunit >
67-
68- Now, when running ``vendor/bin/phpunit ``, the cache will be cleared
69- automatically by the bootstrap file before running all tests.
You can’t perform that action at this time.
0 commit comments