1
0
mirror of https://github.com/php/pie.git synced 2026-03-23 23:12:17 +01:00

Ensure the phpApiVersion we look for is wildly different from anything in real life, so auto detection does not pick up the real system phpize

This commit is contained in:
James Titcumb
2026-03-18 11:59:18 +00:00
parent 06e86c8745
commit bb33861b5f

View File

@@ -111,7 +111,8 @@ final class PhpizeBuildToolFinderTest extends TestCase
putenv('PATH=' . realpath(self::GOOD_PHPIZE_PATH));
$mockPhpBinary = $this->createMock(PhpBinaryPath::class);
$mockPhpBinary->method('phpApiVersion')->willReturn('20250925');
// This should not be any API version of a real PHP, otherwise this test might pick up a wrong phpize and false-positive :D
$mockPhpBinary->method('phpApiVersion')->willReturn('30250925');
(fn () => $this->phpBinaryPath = '/path/to/php')
->bindTo($mockPhpBinary, PhpBinaryPath::class)();