Have phpunit.php exit with 1 in case it couldn't run the tests
authorMarius Hoch <hoo@online.de>
Thu, 9 Apr 2015 08:32:59 +0000 (10:32 +0200)
committerMarius Hoch <hoo@online.de>
Thu, 9 Apr 2015 08:32:59 +0000 (10:32 +0200)
Just makes more sense not to claim we could complete everything
if we actually couldn't.

Change-Id: I4ec3a2da8913ca546782919813eb18a05a5cca0a

tests/phpunit/phpunit.php

index e59b506..d18ab73 100755 (executable)
@@ -228,12 +228,14 @@ foreach ( array(
 }
 
 if ( !$ok ) {
-       die( "Couldn't find a usable PHPUnit.\n" );
+       echo "Couldn't find a usable PHPUnit.\n";
+       exit( 1 );
 }
 
 $puVersion = PHPUnit_Runner_Version::id();
 if ( $puVersion !== '@package_version@' && version_compare( $puVersion, '3.7.0', '<' ) ) {
-       die( "PHPUnit 3.7.0 or later required; you have {$puVersion}.\n" );
+       echo "PHPUnit 3.7.0 or later required; you have {$puVersion}.\n";
+       exit( 1 );
 }
 
 PHPUnit_TextUI_Command::main();