mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
* Update spc self to PHP 8.4 only * Update workflows * Fix test-extensions, adjust docs order * Fix cs-fix and phpunit * Add PHP_CS_FIXER_IGNORE_ENV * Add compatibility for PHP 8.3 * Change version description in README, adjust composer.json PHP version limit * Switch PHP to 8.4 in spc-alpine-docker * Add deprecation notice
32 lines
638 B
PHP
32 lines
638 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\Tests\builder\macos;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use SPC\builder\macos\SystemUtil;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
class SystemUtilTest extends TestCase
|
|
{
|
|
public static function setUpBeforeClass(): void
|
|
{
|
|
if (PHP_OS_FAMILY !== 'Darwin') {
|
|
self::markTestSkipped('This test is only for macOS');
|
|
}
|
|
}
|
|
|
|
public function testGetCpuCount()
|
|
{
|
|
$this->assertIsInt(SystemUtil::getCpuCount());
|
|
}
|
|
|
|
public function testGetArchCFlags()
|
|
{
|
|
$this->assertEquals('--target=x86_64-apple-darwin', SystemUtil::getArchCFlags('x86_64'));
|
|
}
|
|
}
|