Unverified Commit 7041c1c5 authored by alexpott's avatar alexpott

Issue #3024259 by Pol, alexpott: [PHP 7.3] Fix...

Issue #3024259 by Pol, alexpott: [PHP 7.3] Fix EnvironmentTest::providerTestCheckMemoryLimit() notice

(cherry picked from commit e57c4a13)
parent 305fd923
...@@ -44,14 +44,11 @@ public function testCheckMemoryLimit($required, $custom_memory_limit, $expected) ...@@ -44,14 +44,11 @@ public function testCheckMemoryLimit($required, $custom_memory_limit, $expected)
* required and memory_limit, and the expected return value. * required and memory_limit, and the expected return value.
*/ */
public function providerTestCheckMemoryLimit() { public function providerTestCheckMemoryLimit() {
$memory_limit = ini_get('memory_limit');
$twice_avail_memory = ($memory_limit * 2) . 'MB';
return [ return [
// Minimal amount of memory should be available. // Minimal amount of memory should be available.
['30MB', NULL, TRUE], ['30MB', NULL, TRUE],
// Exceed a custom (unlimited) memory limit. // Test an unlimited memory limit.
[$twice_avail_memory, -1, TRUE], ['9999999999YB', -1, TRUE],
// Exceed a custom memory limit. // Exceed a custom memory limit.
['30MB', '16MB', FALSE], ['30MB', '16MB', FALSE],
// Available = required. // Available = required.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment