Add more PHPUnit tests

This commit is contained in:
crazywhalecc
2025-04-18 14:01:03 +08:00
committed by Jerry Ma
parent 5e67133495
commit b06db1f920
6 changed files with 199 additions and 0 deletions

View File

@@ -16,6 +16,12 @@ final class DependencyUtilTest extends TestCase
{
public function testGetExtLibsByDeps(): void
{
// setup
$bak = [
'source' => Config::$source,
'lib' => Config::$lib,
'ext' => Config::$ext,
];
// example
Config::$source = [
'test1' => [
@@ -82,6 +88,10 @@ final class DependencyUtilTest extends TestCase
$this->assertTrue($b < $a);
$this->assertTrue($c < $a);
$this->assertTrue($c < $b);
// restore
Config::$source = $bak['source'];
Config::$lib = $bak['lib'];
Config::$ext = $bak['ext'];
}
public function testNotExistExtException(): void