mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Add new tests, remove redundant code
This commit is contained in:
31
tests/SPC/builder/macos/SystemUtilTest.php
Normal file
31
tests/SPC/builder/macos/SystemUtilTest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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::markTestIncomplete('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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user