summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2018-04-03 11:41:33 (GMT)
committerNathaniel Catchpole2018-04-03 11:41:33 (GMT)
commit065807745f4d98a5130a615dce546875531cd547 (patch)
treea649a5f6d1ffc4657584432e6277fe048988e28f
parenteecd757072f482fe871c2af5866052e82953f9bb (diff)
Issue #2932606 by jibran, mpdonadio, alexpott, catch: Use PHPUnit 6 for PHP 7.0 / 7.1 testing
-rw-r--r--core/lib/Drupal/Core/Composer/Composer.php4
-rw-r--r--core/scripts/run-tests.sh2
-rw-r--r--core/tests/bootstrap.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/core/lib/Drupal/Core/Composer/Composer.php b/core/lib/Drupal/Core/Composer/Composer.php
index 04f9564..c84797f 100644
--- a/core/lib/Drupal/Core/Composer/Composer.php
+++ b/core/lib/Drupal/Core/Composer/Composer.php
@@ -160,7 +160,7 @@ EOT;
return;
}
- // If the PHP version is 7.2 or above and PHPUnit is less than version 6
+ // If the PHP version is 7.0 or above and PHPUnit is less than version 6
// call the drupal-phpunit-upgrade script to upgrade PHPUnit.
if (!static::upgradePHPUnitCheck($phpunit_package->getVersion())) {
$event->getComposer()
@@ -182,7 +182,7 @@ EOT;
* TRUE if the PHPUnit needs to be upgraded, FALSE if not.
*/
public static function upgradePHPUnitCheck($phpunit_version) {
- return !(version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, '7.2') >= 0 && version_compare($phpunit_version, '6.1') < 0);
+ return !(version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, '7.0') >= 0 && version_compare($phpunit_version, '6.1') < 0);
}
/**
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 4916f8c..6a8eaca 100644
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -140,7 +140,7 @@ else {
$phpunit_version = Version::id();
}
if (!Composer::upgradePHPUnitCheck($phpunit_version)) {
- simpletest_script_print_error("PHPUnit testing framework version 6 or greater is required when running on PHP 7.2 or greater. Run the command 'composer run-script drupal-phpunit-upgrade' in order to fix this.");
+ simpletest_script_print_error("PHPUnit testing framework version 6 or greater is required when running on PHP 7.0 or greater. Run the command 'composer run-script drupal-phpunit-upgrade' in order to fix this.");
exit(SIMPLETEST_SCRIPT_EXIT_FAILURE);
}
diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php
index 1905f15..257e40f 100644
--- a/core/tests/bootstrap.php
+++ b/core/tests/bootstrap.php
@@ -159,7 +159,7 @@ else {
$phpunit_version = Version::id();
}
if (!Composer::upgradePHPUnitCheck($phpunit_version)) {
- $message = "PHPUnit testing framework version 6 or greater is required when running on PHP 7.2 or greater. Run the command 'composer run-script drupal-phpunit-upgrade' in order to fix this.";
+ $message = "PHPUnit testing framework version 6 or greater is required when running on PHP 7.0 or greater. Run the command 'composer run-script drupal-phpunit-upgrade' in order to fix this.";
echo "\033[31m" . $message . "\n\033[0m";
exit(1);
}