mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 00:35:41 +08:00
Fix error handling in loadFromFile methods and update exception types in tests
This commit is contained in:
@@ -26,7 +26,7 @@ class ArtifactConfigTest extends TestCase
|
||||
$reflection = new \ReflectionClass(ArtifactConfig::class);
|
||||
$property = $reflection->getProperty('artifact_configs');
|
||||
$property->setAccessible(true);
|
||||
$property->setValue([]);
|
||||
$property->setValue(null, []);
|
||||
}
|
||||
|
||||
/** @noinspection PhpExpressionResultUnusedInspection */
|
||||
@@ -42,7 +42,7 @@ class ArtifactConfigTest extends TestCase
|
||||
$reflection = new \ReflectionClass(ArtifactConfig::class);
|
||||
$property = $reflection->getProperty('artifact_configs');
|
||||
$property->setAccessible(true);
|
||||
$property->setValue([]);
|
||||
$property->setValue(null, []);
|
||||
}
|
||||
|
||||
public function testLoadFromDirThrowsExceptionWhenDirectoryDoesNotExist(): void
|
||||
|
||||
@@ -26,7 +26,7 @@ class PackageConfigTest extends TestCase
|
||||
$reflection = new \ReflectionClass(PackageConfig::class);
|
||||
$property = $reflection->getProperty('package_configs');
|
||||
$property->setAccessible(true);
|
||||
$property->setValue([]);
|
||||
$property->setValue(null, []);
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
@@ -41,7 +41,7 @@ class PackageConfigTest extends TestCase
|
||||
$reflection = new \ReflectionClass(PackageConfig::class);
|
||||
$property = $reflection->getProperty('package_configs');
|
||||
$property->setAccessible(true);
|
||||
$property->setValue([]);
|
||||
$property->setValue(null, []);
|
||||
}
|
||||
|
||||
public function testLoadFromDirThrowsExceptionWhenDirectoryDoesNotExist(): void
|
||||
|
||||
Reference in New Issue
Block a user