Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions testing/bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ cache before running those tests.

To do this, first add the following file::

// app/tests.bootstrap.php
// tests.bootstrap.php
if (isset($_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'])) {
passthru(sprintf(
'php "%s/console" cache:clear --env=%s --no-warmup',
'php "%s/bin/console" cache:clear --env=%s --no-warmup',
__DIR__,
$_ENV['BOOTSTRAP_CLEAR_CACHE_ENV']
));
}

require __DIR__.'/autoload.php';
require __DIR__ . '/vendor/autoload.php';

Replace the test bootstrap file ``autoload.php`` in ``phpunit.xml.dist``
with ``tests.bootstrap.php``:
Expand All @@ -38,7 +38,7 @@ cache to be cleared:

<!-- phpunit.xml.dist -->
<php>
<env name="BOOTSTRAP_CLEAR_CACHE_ENV" value="test"/>
<env name="BOOTSTRAP_CLEAR_CACHE_ENV" value="test" />
</php>

This now becomes an environment variable (i.e. ``$_ENV``) that's available
Expand Down