Skip to content

Commit 352a80e

Browse files
committed
Tests: don't set memory limit below 1 MB
This wasn't an issue in dev, but it was breaking in CI with the error: ``` Failed to set memory limit to 1048576 bytes ``` I'm guessing the problem is related to the backwards-incompatible change in PHP 7.4: https://php.watch/versions/7.4/memory_limit-lt-2m php/php-src#7040
1 parent f41e950 commit 352a80e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SoftMemoryLimit/tests/MemoryCheckerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public function testInitializedMemoryChecker() {
1919
}
2020

2121
public function testGetHardLimit() {
22-
$memoryLimit = 1024 * 1024;
22+
$memoryLimit = 3 * 1024 * 1024;
2323
$memoryChecker = \SoftMemoryLimit\MemoryChecker::getSingleton();
2424

25-
// Set it to a MB or something.
25+
// Set it to about 3 MB.
2626
ini_set('memory_limit', "$memoryLimit");
2727
$this->assertSame($memoryLimit, $memoryChecker->getHardLimit());
2828
}

0 commit comments

Comments
 (0)