Skip to content

Commit 5f1df65

Browse files
committed
Issue #3024259 by Pol, alexpott: [PHP 7.3] Fix EnvironmentTest::providerTestCheckMemoryLimit() notice
(cherry picked from commit e57c4a1)
1 parent c4da16e commit 5f1df65

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/Drupal/Tests/Component/Utility/EnvironmentTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,11 @@ public function testCheckMemoryLimit($required, $custom_memory_limit, $expected)
4444
* required and memory_limit, and the expected return value.
4545
*/
4646
public function providerTestCheckMemoryLimit() {
47-
$memory_limit = ini_get('memory_limit');
48-
$twice_avail_memory = ($memory_limit * 2) . 'MB';
49-
5047
return [
5148
// Minimal amount of memory should be available.
5249
['30MB', NULL, TRUE],
53-
// Exceed a custom (unlimited) memory limit.
54-
[$twice_avail_memory, -1, TRUE],
50+
// Test an unlimited memory limit.
51+
['9999999999YB', -1, TRUE],
5552
// Exceed a custom memory limit.
5653
['30MB', '16MB', FALSE],
5754
// Available = required.

0 commit comments

Comments
 (0)