From 1b670c7862a83911804ca8500ab3cd647e26eb2b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 09:57:48 +0800 Subject: [PATCH] Fix getPHPVersionID test --- tests/SPC/builder/BuilderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SPC/builder/BuilderTest.php b/tests/SPC/builder/BuilderTest.php index 4c55591c..3dbdc845 100644 --- a/tests/SPC/builder/BuilderTest.php +++ b/tests/SPC/builder/BuilderTest.php @@ -85,7 +85,7 @@ class BuilderTest extends TestCase { if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) { $file = SOURCE_PATH . '/php-src/main/php_version.h'; - $cnt = preg_match('/PHP_VERSION_ID (\d+)/', $file, $match); + $cnt = preg_match('/PHP_VERSION_ID (\d+)/m', file_get_contents($file), $match); if ($cnt !== 0) { $this->assertEquals(intval($match[1]), $this->builder->getPHPVersionID()); } else {