Skip to content

Commit

Permalink
MDL-67673 phpunit: Disable phpunit results cache by default
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stronk7 committed Oct 21, 2020
1 parent 3a5641c commit 61ff13f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
processIsolation="false"
backupGlobals="false"
backupStaticAttributes="false"
cacheResult="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
Expand Down

0 comments on commit 61ff13f

Please sign in to comment.