diff --git a/core/modules/simpletest/src/Tests/BrokenSetUpTest.php b/core/modules/simpletest/src/Tests/BrokenSetUpTest.php index 6621545..dae351b 100644 --- a/core/modules/simpletest/src/Tests/BrokenSetUpTest.php +++ b/core/modules/simpletest/src/Tests/BrokenSetUpTest.php @@ -30,6 +30,11 @@ class BrokenSetUpTest extends WebTestBase { public static $modules = array('simpletest'); /** + * The memory limit for this test, Testing module requires 128M. + */ + protected $memoryUsageTrigger = 128; + + /** * The path to the shared trigger file. * * @var string diff --git a/core/modules/simpletest/src/Tests/InstallationProfileModuleTestsTest.php b/core/modules/simpletest/src/Tests/InstallationProfileModuleTestsTest.php index 424469a..4cca66a 100644 --- a/core/modules/simpletest/src/Tests/InstallationProfileModuleTestsTest.php +++ b/core/modules/simpletest/src/Tests/InstallationProfileModuleTestsTest.php @@ -31,6 +31,11 @@ class InstallationProfileModuleTestsTest extends WebTestBase { protected $adminUser; /** + * The memory limit for this test, Testing module requires 128M. + */ + protected $memoryUsageTrigger = 128; + + /** * Use the Testing profile. * * The Testing profile contains drupal_system_listing_compatible_test.test, diff --git a/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php b/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php index e4790f9..667181e 100644 --- a/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php +++ b/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php @@ -23,6 +23,11 @@ class MissingCheckedRequirementsTest extends WebTestBase { */ public static $modules = array('simpletest'); + /** + * The memory limit for this test, Testing module requires 128M. + */ + protected $memoryUsageTrigger = 128; + protected function setUp() { parent::setUp(); $admin_user = $this->drupalCreateUser(array('administer unit tests')); diff --git a/core/modules/simpletest/src/Tests/OtherInstallationProfileTestsTest.php b/core/modules/simpletest/src/Tests/OtherInstallationProfileTestsTest.php index 9cfbfff..74ce9f2 100644 --- a/core/modules/simpletest/src/Tests/OtherInstallationProfileTestsTest.php +++ b/core/modules/simpletest/src/Tests/OtherInstallationProfileTestsTest.php @@ -39,6 +39,11 @@ class OtherInstallationProfileTestsTest extends WebTestBase { protected $profile = 'minimal'; /** + * The memory limit for this test, Testing module requires 128M. + */ + protected $memoryUsageTrigger = 128; + + /** * An administrative user with permission to administer unit tests. * * @var \Drupal\user\UserInterface diff --git a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php index 956d677..cfd7bc4 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php @@ -24,6 +24,11 @@ class SimpleTestBrowserTest extends WebTestBase { */ public static $modules = array('simpletest', 'test_page_test'); + /** + * The memory limit for this test, Testing module requires 128M. + */ + protected $memoryUsageTrigger = 128; + public function setUp() { parent::setUp(); // Create and log in an admin user. diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php index 2514d9d..fc4e865 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php @@ -27,6 +27,11 @@ class SimpleTestTest extends WebTestBase { public static $modules = array('simpletest', 'test_page_test'); /** + * The memory limit for this test, Testing module requires 128M. + */ + protected $memoryUsageTrigger = 128; + + /** * The results array that has been parsed by getTestResults(). * * @var array diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index e366017..9c64c20 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -62,13 +62,6 @@ protected $url; /** - * Set to TRUE to ignore memory usage on the child site. - * - * @var bool - */ - protected $ignoreMemoryUsage = FALSE; - - /** * Set to the maximum number of MB of memory usage to allow on the child site. * * @var int @@ -1413,7 +1406,7 @@ protected function curlHeaderCallback($curlHandler, $header) { // the header. call_user_func_array(array(&$this, 'error'), unserialize(urldecode($matches[1]))); } - if (!$this->ignoreMemoryUsage && preg_match('/^X-Drupal-Memory-Peak: (.*)$/', $header, $matches)) { + if (preg_match('/^X-Drupal-Memory-Peak: (.*)$/', $header, $matches)) { if ((float) $matches[1] >= $this->memoryUsageTrigger) { $this->fail(SafeMarkup::format('Child site memory usage (@siteMB) exceeded acceptable maximum (@maxMB) on url @url', [ '@url' => $this->getUrl(),