mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
Fix getPHPVersionID test
This commit is contained in:
parent
d6bea6295e
commit
948b55026c
@ -85,7 +85,7 @@ class BuilderTest extends TestCase
|
|||||||
{
|
{
|
||||||
if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) {
|
if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) {
|
||||||
$file = 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) {
|
if ($cnt !== 0) {
|
||||||
$this->assertEquals(intval($match[1]), $this->builder->getPHPVersionID());
|
$this->assertEquals(intval($match[1]), $this->builder->getPHPVersionID());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user