From a834af38c47fb9214d3663bc3bd5ad0bc5ab1cff Mon Sep 17 00:00:00 2001 From: Peter Gasser Date: Wed, 8 Nov 2017 16:10:32 +0100 Subject: [PATCH] fix paths * comment said `app/tests.bootstrap.php` but xml referenced the root * path to autoload was wrong * Symfony console now is in `/bin` --- testing/bootstrap.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/bootstrap.rst b/testing/bootstrap.rst index 5f9faf85aac..3b44901f18f 100644 --- a/testing/bootstrap.rst +++ b/testing/bootstrap.rst @@ -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``: @@ -38,7 +38,7 @@ cache to be cleared: - + This now becomes an environment variable (i.e. ``$_ENV``) that's available