diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 23d63bc..26a75f6 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -86,9 +86,7 @@ * @see http://php.net/manual/reserved.variables.server.php * @see http://php.net/manual/function.time.php */ -if (!defined('REQUEST_TIME')) { - define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']); -} +define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']); /** * Regular expression to match PHP function names. @@ -116,9 +114,7 @@ * * This strips two levels of directories off the current directory. */ -if (!defined('DRUPAL_ROOT')) { - define('DRUPAL_ROOT', dirname(dirname(__DIR__))); -} +define('DRUPAL_ROOT', dirname(dirname(__DIR__))); /** * Returns the appropriate configuration directory. diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 791c660..8caadaf 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -148,13 +148,16 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { protected $serviceYamls; /** - * List of discovered service provider class names. + * List of discovered service provider class names or objects. * * This is a nested array whose top-level keys are 'app' and 'site', denoting * the origin of a service provider. Site-specific providers have to be * collected separately, because they need to be processed last, so as to be * able to override services from application service providers. * + * Allowing objects is for example used for allowing + * \Drupal\Tests\KernelTestBase to register itself as service provider. + * * @var array */ protected $serviceProviderClasses; diff --git a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php index 87b3af4..dab71d4 100644 --- a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php @@ -24,7 +24,7 @@ class ModuleHandlerTest extends KernelTestBase { protected function setUp() { parent::setUp(); - // @fixme ModuleInstaller calls system_rebuild_module_data which is part of + // @todo ModuleInstaller calls system_rebuild_module_data which is part of // system.module, see https://www.drupal.org/node/2208429 include_once $this->root . '/core/modules/system/system.module'; } diff --git a/core/tests/Drupal/Tests/KernelTestBase.php b/core/tests/Drupal/Tests/KernelTestBase.php index 9984a6f..1266189 100644 --- a/core/tests/Drupal/Tests/KernelTestBase.php +++ b/core/tests/Drupal/Tests/KernelTestBase.php @@ -63,7 +63,7 @@ /** * Flag to reset any manipulations to global variables between tests. * - * TRUE by default, but MUST be TRUE for kernel tests. + * Don't change the value, unless you really know what you are doing. * * @var bool */ diff --git a/core/tests/Drupal/Tests/KernelTestBaseTest.php b/core/tests/Drupal/Tests/KernelTestBaseTest.php index b68bbb5..6f228dd 100644 --- a/core/tests/Drupal/Tests/KernelTestBaseTest.php +++ b/core/tests/Drupal/Tests/KernelTestBaseTest.php @@ -104,7 +104,7 @@ public function testSetUp() { public function testSetUpDoesNotLeak() { $this->assertArrayNotHasKey('destroy-me', $GLOBALS); - // We store teh active configuration in the DB. + // We store the active configuration in the DB. $expected = ['config' => 'config']; $schema = $this->container->get('database')->schema(); $this->assertEquals($expected, $schema->findTables('%'));