diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php index a2bf771e0ae7d381499b5c1847713b342e2602bb..3692cfdd361db477a00a101638358ae0c515208a 100644 --- a/core/modules/simpletest/src/BrowserTestBase.php +++ b/core/modules/simpletest/src/BrowserTestBase.php @@ -41,11 +41,6 @@ * Drupal\Tests\yourmodule\Functional namespace and live in the * modules/yourmodule/Tests/Functional directory. * - * All BrowserTestBase tests must have two annotations to ensure process - * isolation: - * - @runTestsInSeparateProcesses - * - @preserveGlobalState disabled - * * @ingroup testing * * @see \Drupal\simpletest\WebTestBase @@ -216,6 +211,19 @@ abstract class BrowserTestBase extends \PHPUnit_Framework_TestCase { */ protected $mink; + /** + * {@inheritdoc} + * + * Browser tests are run in separate processes to prevent collisions between + * code that may be loaded by tests. + */ + protected $runTestInSeparateProcess = TRUE; + + /** + * {@inheritdoc} + */ + protected $preserveGlobalState = FALSE; + /** * Initializes Mink sessions. */ diff --git a/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php b/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php index 48865e1e36890c2cd87365de9b90ce9f0e918321..c082d0372abb0c9499b9c504f9c92fda9ab50b78 100644 --- a/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php +++ b/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php @@ -13,9 +13,6 @@ * Tests BrowserTestBase functionality. * * @group simpletest - * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled */ class BrowserTestBaseTest extends BrowserTestBase { diff --git a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php index 71c90bf5f27e1a0a7e474c05a08d996b40bdc062..7eb807f5376f29f645f7ad0f2776d69640faed61 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php @@ -14,8 +14,6 @@ /** * @coversDefaultClass \Drupal\Core\Form\FormCache * @group Form - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled */ class FormCacheTest extends UnitTestCase { @@ -89,6 +87,16 @@ class FormCacheTest extends UnitTestCase { */ protected $requestPolicy; + /** + * {@inheritdoc} + */ + protected $runTestInSeparateProcess = TRUE; + + /** + * {@inheritdoc} + */ + protected $preserveGlobalState = FALSE; + /** * {@inheritdoc} */