upgrades core to 8.4.2
This commit is contained in:
@@ -17,6 +17,7 @@ use Drupal\Core\Test\TestRunnerKernel;
|
||||
use Drupal\simpletest\Form\SimpletestResultsForm;
|
||||
use Drupal\simpletest\TestBase;
|
||||
use Drupal\simpletest\TestDiscovery;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
$autoloader = require_once __DIR__ . '/../../autoload.php';
|
||||
@@ -36,7 +37,7 @@ const SIMPLETEST_SCRIPT_EXIT_SUCCESS = 0;
|
||||
const SIMPLETEST_SCRIPT_EXIT_FAILURE = 1;
|
||||
const SIMPLETEST_SCRIPT_EXIT_EXCEPTION = 2;
|
||||
|
||||
if (!class_exists('\PHPUnit_Framework_TestCase')) {
|
||||
if (!class_exists(TestCase::class)) {
|
||||
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);
|
||||
}
|
||||
@@ -783,7 +784,7 @@ function simpletest_script_run_one_test($test_id, $test_class) {
|
||||
$methods = array();
|
||||
}
|
||||
$test = new $class_name($test_id);
|
||||
if (is_subclass_of($test_class, '\PHPUnit_Framework_TestCase')) {
|
||||
if (is_subclass_of($test_class, TestCase::class)) {
|
||||
$status = simpletest_script_run_phpunit($test_id, $test_class);
|
||||
}
|
||||
else {
|
||||
@@ -865,7 +866,7 @@ function simpletest_script_command($test_id, $test_class) {
|
||||
* @see simpletest_script_run_one_test()
|
||||
*/
|
||||
function simpletest_script_cleanup($test_id, $test_class, $exitcode) {
|
||||
if (is_subclass_of($test_class, '\PHPUnit_Framework_TestCase')) {
|
||||
if (is_subclass_of($test_class, TestCase::class)) {
|
||||
// PHPUnit test, move on.
|
||||
return;
|
||||
}
|
||||
@@ -1020,7 +1021,7 @@ function simpletest_script_get_test_list() {
|
||||
else {
|
||||
foreach ($matches[1] as $class_name) {
|
||||
$namespace_class = $namespace . '\\' . $class_name;
|
||||
if (is_subclass_of($namespace_class, '\Drupal\simpletest\TestBase') || is_subclass_of($namespace_class, '\PHPUnit_Framework_TestCase')) {
|
||||
if (is_subclass_of($namespace_class, '\Drupal\simpletest\TestBase') || is_subclass_of($namespace_class, TestCase::class)) {
|
||||
$test_list[] = $namespace_class;
|
||||
}
|
||||
}
|
||||
@@ -1074,7 +1075,7 @@ function simpletest_script_get_test_list() {
|
||||
else {
|
||||
foreach ($matches[1] as $class_name) {
|
||||
$namespace_class = $namespace . '\\' . $class_name;
|
||||
if (is_subclass_of($namespace_class, '\Drupal\simpletest\TestBase') || is_subclass_of($namespace_class, '\PHPUnit_Framework_TestCase')) {
|
||||
if (is_subclass_of($namespace_class, '\Drupal\simpletest\TestBase') || is_subclass_of($namespace_class, TestCase::class)) {
|
||||
$test_list[] = $namespace_class;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user