mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
cs-fix and fix tests
This commit is contained in:
parent
58095a61c8
commit
3c802119ed
@ -24,8 +24,9 @@ class GlobalEnvManager
|
||||
/**
|
||||
* Initialize the environment variables
|
||||
*
|
||||
* @param BuilderBase $builder Builder
|
||||
* @param null|BuilderBase $builder Builder
|
||||
* @throws RuntimeException
|
||||
* @throws WrongUsageException
|
||||
*/
|
||||
public static function init(?BuilderBase $builder = null): void
|
||||
{
|
||||
|
||||
@ -102,7 +102,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 "(\d+\.\d+\.\d+)"/', $file, $match);
|
||||
$cnt = preg_match('/PHP_VERSION "(\d+\.\d+\.\d+)"/', file_get_contents($file), $match);
|
||||
if ($cnt !== 0) {
|
||||
$this->assertEquals($match[1], $this->builder->getPHPVersion());
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user