File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public static function subprocessProvider(): \Generator
47
47
yield 'Process does ignore dynamic memory_limit ' => [
48
48
'Process ' ,
49
49
self ::getRandomMemoryLimit (),
50
- self ::getCurrentMemoryLimit (),
50
+ self ::getDefaultMemoryLimit (),
51
51
];
52
52
53
53
yield 'PhpSubprocess does not ignore dynamic memory_limit ' => [
@@ -57,16 +57,16 @@ public static function subprocessProvider(): \Generator
57
57
];
58
58
}
59
59
60
- private static function getCurrentMemoryLimit (): string
60
+ private static function getDefaultMemoryLimit (): string
61
61
{
62
- return trim (\ini_get ( 'memory_limit ' ) );
62
+ return trim (ini_get_all ()[ 'memory_limit ' ][ ' global_value ' ] );
63
63
}
64
64
65
65
private static function getRandomMemoryLimit (): string
66
66
{
67
67
$ memoryLimit = 123 ; // Take something that's really unlikely to be configured on a user system.
68
68
69
- while (($ formatted = $ memoryLimit .'M ' ) === self ::getCurrentMemoryLimit ()) {
69
+ while (($ formatted = $ memoryLimit .'M ' ) === self ::getDefaultMemoryLimit ()) {
70
70
++$ memoryLimit ;
71
71
}
72
72
You can’t perform that action at this time.
0 commit comments