summaryrefslogtreecommitdiffstats
path: root/core/scripts
diff options
context:
space:
mode:
authorAlex Pott2016-08-25 10:04:13 (GMT)
committerAlex Pott2016-08-25 10:04:13 (GMT)
commitb8500a93102df90a32e5a80369efae20f3fb7029 (patch)
tree8539bef1ad324dae38d108540cfe3822fe428ac4 /core/scripts
parent971a73c6bad0a2b2c1ce147e7b48870bcb80ffc9 (diff)
Issue #2780093 by Mile23: Have simpletest, run-tests.sh enforce their dependency on PHPUnit
Diffstat (limited to 'core/scripts')
-rwxr-xr-xcore/scripts/run-tests.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index a981c25..cd00d74 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -34,6 +34,11 @@ const SIMPLETEST_SCRIPT_EXIT_SUCCESS = 0;
const SIMPLETEST_SCRIPT_EXIT_FAILURE = 1;
const SIMPLETEST_SCRIPT_EXIT_EXCEPTION = 2;
+if (!class_exists('\PHPUnit_Framework_TestCase')) {
+ echo "\nrun-tests.sh requires the PHPUnit testing framework. Please use 'composer install --dev' to ensure that it is present.\n\n";
+ exit(SIMPLETEST_SCRIPT_EXIT_FAILURE);
+}
+
// Set defaults and get overrides.
list($args, $count) = simpletest_script_parse_args();