From 1886d9df926fd52750e31c23b1bc35916926a9c3 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 20 Mar 2018 08:08:29 +0800 Subject: [PATCH] MDL-61689 phpunit: Be stricter about output during unit tests This change also add fail-on-risky to travis to help pick these up, and verbosity too. We only fail on risky during Travis and not during normal output because developers may want to debug tests. --- .travis.yml | 2 +- phpunit.xml.dist | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 54b7b79e46d..5abe6238658 100644 --- a/.travis.yml +++ b/.travis.yml @@ -248,7 +248,7 @@ script: - > if [ "$TASK" = 'PHPUNIT' ]; then - vendor/bin/phpunit; + vendor/bin/phpunit --fail-on-risky --disallow-test-output --verbose; fi - > diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 963f63cdfb4..7c0b6706e27 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,6 +14,7 @@ stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" + beStrictAboutOutputDuringTests="true" printerClass="Hint_ResultPrinter" testSuiteLoaderClass="phpunit_autoloader" >