diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index 3a4ea2aad3..cd3658bde9 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -12,7 +12,7 @@ use Drupal\Core\Test\TestDatabase; use Drupal\Core\Test\TestSetupTrait; use Drupal\Core\Utility\Error; -use Drupal\KernelTests\TestServiceProvider; +use Drupal\KernelTests\TestServiceProvider as KernelTestServiceProvider; use Drupal\Tests\AssertHelperTrait as BaseAssertHelperTrait; use Drupal\Tests\ConfigTestTrait; use Drupal\Tests\RandomGeneratorTrait; @@ -891,7 +891,7 @@ public function run(array $methods = []) { return; } - TestServiceProvider::$currentTest = $this; + KernelTestServiceProvider::$currentTest = $this; $simpletest_config = $this->config('simpletest.settings'); // Unless preset from run-tests.sh, retrieve the current verbose setting. @@ -997,7 +997,7 @@ public function run(array $methods = []) { TestBase::deleteAssert($test_completion_check_id); } - TestServiceProvider::$currentTest = NULL; + KernelTestServiceProvider::$currentTest = NULL; // Clear out the error messages and restore error handler. \Drupal::messenger()->deleteAll(); restore_error_handler();