8000 fix paths in testing/bootstrap.rst by boedah · Pull Request #8605 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

fix paths in testing/bootstrap.rst #8605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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
0