From 61ff13f0f33f8659bc52375754d9c94425d509fd Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 15 Sep 2020 16:03:05 +0200 Subject: [PATCH] MDL-67673 phpunit: Disable phpunit results cache by default It can be enabled if desired from CLI using the --cache-result option (or modifying the phpunit.xml cacheResult to true). That will create the .phpunit.result.cache files that, later, can be used to easily repeat failed (defects) tests or run the slow ones first and more. See the --order-by option to know more about all the available criteria. For example: ./vendor/bin/phpunit --order-by=defects --stop-on-defect (will run all the failed ones first, stopping on problem, useful for TDD and other scenarios, not so much for complete runs or CI). Also, added to .gitignore so they won't be committed ever. --- .gitignore | 1 + phpunit.xml.dist | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9d02c9bcd5d..41e19ac25a2 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ CVS /.project /.buildpath /.cache +.phpunit.result.cache phpunit.xml # Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us. composer.phar diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 946bff4a3fa..2e84bf29166 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,6 +9,7 @@ processIsolation="false" backupGlobals="false" backupStaticAttributes="false" + cacheResult="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" -- 2.43.0