diff --git a/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php index 83d00bd..4e0e15c 100644 --- a/core/lib/Drupal/Core/DrupalKernelInterface.php +++ b/core/lib/Drupal/Core/DrupalKernelInterface.php @@ -61,7 +61,7 @@ public function getContainer(); /** * Sets the current container. * - * Must be called before boot() in order to bootstrap the given container. + * Subsequently call static::boot() to bootstrap the container. * * @param \Symfony\Component\DependencyInjection\ContainerInterface $container * The container to set. diff --git a/core/tests/Drupal/Tests/AssertLegacyTrait.php b/core/tests/Drupal/Tests/AssertLegacyTrait.php index 2140895..03e25e7 100644 --- a/core/tests/Drupal/Tests/AssertLegacyTrait.php +++ b/core/tests/Drupal/Tests/AssertLegacyTrait.php @@ -12,11 +12,17 @@ * * Protected methods are custom. Public static methods override methods of * \PHPUnit_Framework_Assert. + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use PHPUnit's native + * assert methods instead. */ trait AssertLegacyTrait { /** * @see \Drupal\simpletest\TestBase::assert() + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use self::assertTrue() + * instead. */ protected function assert($actual, $message = '') { parent::assertTrue((bool) $actual, $message); @@ -48,6 +54,9 @@ public static function assertFalse($actual, $message = '') { /** * @see \Drupal\simpletest\TestBase::assertEqual() + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use self::assertEquals() + * instead. */ protected function assertEqual($actual, $expected, $message = '') { $this->assertEquals($expected, $actual, $message); @@ -55,6 +64,9 @@ protected function assertEqual($actual, $expected, $message = '') { /** * @see \Drupal\simpletest\TestBase::assertNotEqual() + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use + * self::assertNotEquals() instead. */ protected function assertNotEqual($actual, $expected, $message = '') { $this->assertNotEquals($expected, $actual, $message); @@ -62,6 +74,9 @@ protected function assertNotEqual($actual, $expected, $message = '') { /** * @see \Drupal\simpletest\TestBase::assertIdentical() + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use self::assertSame() + * instead. */ protected function assertIdentical($actual, $expected, $message = '') { $this->assertSame($expected, $actual, $message); @@ -69,6 +84,9 @@ protected function assertIdentical($actual, $expected, $message = '') { /** * @see \Drupal\simpletest\TestBase::assertNotIdentical() + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use + * self::assertNotSame() instead. */ protected function assertNotIdentical($actual, $expected, $message = '') { $this->assertNotSame($expected, $actual, $message); @@ -76,6 +94,9 @@ protected function assertNotIdentical($actual, $expected, $message = '') { /** * @see \Drupal\simpletest\TestBase::assertIdenticalObject() + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use self::assertEquals() + * instead. */ protected function assertIdenticalObject($actual, $expected, $message = '') { // Note: ::assertSame checks whether its the same object. ::assertEquals @@ -86,6 +107,9 @@ protected function assertIdenticalObject($actual, $expected, $message = '') { /** * @see \Drupal\simpletest\TestBase::pass() + * + * @deprecated Scheduled for removal in Drupal 9.0.0. Use self::assertTrue() + * instead. */ protected function pass($message) { $this->assertTrue(TRUE, $message); diff --git a/core/tests/Drupal/Tests/KernelTestBase.php b/core/tests/Drupal/Tests/KernelTestBase.php index 1266189..97fb006 100644 --- a/core/tests/Drupal/Tests/KernelTestBase.php +++ b/core/tests/Drupal/Tests/KernelTestBase.php @@ -61,30 +61,35 @@ use RandomGeneratorTrait; /** - * Flag to reset any manipulations to global variables between tests. + * {@inheritdoc} * - * Don't change the value, unless you really know what you are doing. + * Back-up and restore any global variables that may be changed by tests. * - * @var bool + * @see self::runTestInSeparateProcess */ protected $backupGlobals = TRUE; /** * {@inheritdoc} + * + * Kernel tests are run in separate processes to prevent collisions between + * code that may be loaded by tests. */ protected $runTestInSeparateProcess = TRUE; /** - * Flag to reset all static class properties between tests. + * {@inheritdoc} * - * @var bool + * Back-up and restore static class properties that may be changed by tests. + * + * @see self::runTestInSeparateProcess */ protected $backupStaticAttributes = TRUE; /** - * Contains a few static class properties for performance. + * {@inheritdoc} * - * @var array + * Contains a few static class properties for performance. */ protected $backupStaticAttributesBlacklist = array( // Ignore static discovery/parser caches to speed up tests. @@ -99,9 +104,12 @@ ); /** - * If a test runs in a separate process, do not forward any state. + * {@inheritdoc} + * + * Do not forward any global state from the parent process to the processes + * that run the actual tests. * - * @var bool + * @see self::runTestInSeparateProcess */ protected $preserveGlobalState = FALSE;