diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index 01a0cfb..ac2deac 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -1071,7 +1071,7 @@ private function prepareEnvironment() { // Reset statics. drupal_static_reset(); - // Reset and create a new service container. + // Ensure there is no service container. $this->container = NULL; \Drupal::setContainer(NULL); @@ -1209,7 +1209,6 @@ private function restoreEnvironment() { $callbacks = $this->originalShutdownCallbacks; // Restore original user session. - \Drupal::getContainer()->set('current_user', $this->originalUser); \Drupal::service('session_manager')->enable(); } diff --git a/core/modules/system/src/Tests/Common/HtmlIdentifierUnitTest.php b/core/modules/system/src/Tests/Common/HtmlIdentifierUnitTest.php index 3d076ce..cdfc45a 100644 --- a/core/modules/system/src/Tests/Common/HtmlIdentifierUnitTest.php +++ b/core/modules/system/src/Tests/Common/HtmlIdentifierUnitTest.php @@ -7,12 +7,12 @@ namespace Drupal\system\Tests\Common; -use Drupal\simpletest\DrupalUnitTestBase; +use Drupal\simpletest\KernelTestBase; /** * Tests cleaning HTML identifiers. */ -class HtmlIdentifierUnitTest extends DrupalUnitTestBase { +class HtmlIdentifierUnitTest extends KernelTestBase { public static function getInfo() { return array( 'name' => 'HTML identifiers', diff --git a/core/modules/system/src/Tests/Common/SizeUnitTest.php b/core/modules/system/src/Tests/Common/SizeUnitTest.php index c2b9959..680f010 100644 --- a/core/modules/system/src/Tests/Common/SizeUnitTest.php +++ b/core/modules/system/src/Tests/Common/SizeUnitTest.php @@ -8,12 +8,12 @@ namespace Drupal\system\Tests\Common; use Drupal\Component\Utility\Bytes; -use Drupal\simpletest\DrupalUnitTestBase; +use Drupal\simpletest\KernelTestBase; /** * Tests file size parsing and formatting functions. */ -class SizeUnitTest extends DrupalUnitTestBase { +class SizeUnitTest extends KernelTestBase { protected $exact_test_cases; protected $rounded_test_cases; diff --git a/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php b/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php index 9f93c44..ebc6269 100644 --- a/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php +++ b/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php @@ -7,13 +7,13 @@ namespace Drupal\system\Tests\Common; -use Drupal\simpletest\DrupalUnitTestBase; +use Drupal\simpletest\KernelTestBase; use Symfony\Component\HttpFoundation\Request; /** * Tests table sorting features implemented in tablesort.inc. */ -class TableSortExtenderUnitTest extends DrupalUnitTestBase { +class TableSortExtenderUnitTest extends KernelTestBase { public static function getInfo() { return array( diff --git a/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php b/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php index a3ab7b3..3015d14 100644 --- a/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php +++ b/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php @@ -7,12 +7,12 @@ namespace Drupal\system\Tests\Plugin\Discovery; -use Drupal\simpletest\DrupalUnitTestBase; +use Drupal\simpletest\KernelTestBase; /** * Base class for plugin discovery tests. */ -abstract class DiscoveryTestBase extends DrupalUnitTestBase { +abstract class DiscoveryTestBase extends KernelTestBase { /** * The discovery component to test. diff --git a/core/modules/system/src/Tests/Plugin/PluginTestBase.php b/core/modules/system/src/Tests/Plugin/PluginTestBase.php index fdb4b2d..72b0ffe 100644 --- a/core/modules/system/src/Tests/Plugin/PluginTestBase.php +++ b/core/modules/system/src/Tests/Plugin/PluginTestBase.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Plugin; -use Drupal\simpletest\DrupalUnitTestBase; +use Drupal\simpletest\KernelTestBase; use Drupal\plugin_test\Plugin\TestPluginManager; use Drupal\plugin_test\Plugin\MockBlockManager; use Drupal\plugin_test\Plugin\DefaultsTestPluginManager; @@ -17,7 +17,7 @@ /** * Base class for Plugin API unit tests. */ -abstract class PluginTestBase extends DrupalUnitTestBase { +abstract class PluginTestBase extends KernelTestBase { /** * Modules to enable.