github操作无法创建用于模拟phpunit

问题描述 投票:0回答:1

这里是我的github动作文件

PHPUnit 11.5.4 by Sebastian Bergmann and contributors. Runtime: PHP 8.4.3 Configuration: /home/runner/work/archers-framework/archers-framework/phpunit.xml ..........FF..F..........................FF..FF.................. 65 / 97 ( 67%) ................................ 97 / 97 (100%) Time: 00:00.072, Memory: 10.00 MB Authority (Tests\ArchersFramework\Http\Authority) ✔ Valid authority string ✔ Authority string without credentials ✔ Authority string without port ✔ Authority string without credentials and port ✔ Invalid authority string ✔ Authority with credentials only ✔ Authority to string Container ✔ Get returns same instance for singleton ✔ Get returns new instance for factory ✔ Instance returns same object ✔ Autowires dependencies ✔ Throws exception for not autowireable class ✔ Inject attribute overrides default ✔ Throws exception for missing type hint ✔ Throws exception for unresolvable scalar type ✔ Handles nullable parameters ✔ Detects circular dependency Controller Discovery (ArchersFramework\Tests\Router\Discovery\ControllerDiscovery) ✘ Discover controllers in windows path │ │ Failed asserting that an array contains 'App\Controllers\WindowsTestController'. │ │ /home/runner/work/archers-framework/archers-framework/tests/Router/Discovery/ControllerDiscoveryTest.php:85 │ /home/runner/work/archers-framework/archers-framework/vendor/bin/phpunit:122 │ ✘ Discover controllers in linux path │ │ Failed asserting that an array contains 'App\Controllers\LinuxTestController'. │ │ /home/runner/work/archers-framework/archers-framework/tests/Router/Discovery/ControllerDiscoveryTest.php:98 │ /home/runner/work/archers-framework/archers-framework/vendor/bin/phpunit:122 │ ✔ Ignores non php files ✔ Ignores php files with wrong extension ✘ Handles nested directories │ │ Failed asserting that an array contains 'App\Controllers\Nested\DeepController'. │ │ /home/runner/work/archers-framework/archers-framework/tests/Router/Discovery/ControllerDiscoveryTest.php:137 │ /home/runner/work/archers-framework/archers-framework/vendor/bin/phpunit:122 │ ✘ Handles mixed directory separators │ │ Failed asserting that an array contains 'App\Controllers\Mixed\PathController'. │ │ /home/runner/work/archers-framework/archers-framework/tests/Router/Discovery/ControllerDiscoveryTest.php:150 │ /home/runner/work/archers-framework/archers-framework/vendor/bin/phpunit:122 │ ✔ Handles empty directory gracefully Glob Recursive (Tests\ArchersFramework\GlobRecursive) ✘ Glob recursive finds files │ │ Failed asserting that actual size 0 matches expected size 2. │ │ /home/runner/work/archers-framework/archers-framework/tests/GlobRecursiveTest.php:53 │ ✘ Glob recursive ignores non matching files │ │ Failed asserting that actual size 0 matches expected size 1. │ │ /home/runner/work/archers-framework/archers-framework/tests/GlobRecursiveTest.php:62 │ ✔ Glob recursive handles empty directory ✔ Glob recursive with no matches ✘ Glob recursive handles complex directory structures │ │ Failed asserting that actual size 0 matches expected size 3. │ │ /home/runner/work/archers-framework/archers-framework/tests/GlobRecursiveTest.php:89 │ Header Collection (Tests\ArchersFramework\Http\HeaderCollection) ✔ Constructor initializes headers ✔ Get returns null if header does not exist ✔ Add adds new header value ✔ Set replaces existing header values ✔ Delete removes header ✔ Delete does nothing if header does not exist ✔ Get all returns all headers ✔ Headers are case insensitive Path (ArchersFramework\Tests\Utilities\Path) ✔ Path joins multiple segments ✔ Path normalizes slashes ✔ Path trims leading and trailing slashes ✔ Empty path returns empty string ✔ Single segment path ✔ Path with mixed separators ✔ Windows absolute path ✔ Windows u n c path ✔ Linux absolute path ✔ Path with empty segments ✔ Path with multiple consecutive slashes ✔ Path with special characters ✔ Path with trailing backslash Response ✔ Response constructor ✔ Send response Route Discovery (ArchersFramework\Tests\Router\Discovery\RouteDiscovery) ✔ Discover routes from controller ✔ Discover routes with prefix from route collection ✔ Discover no routes ✔ Discover invalid controller class ✔ Discover routes with multiple controllers Router (ArchersFramework\Tests\Router\Router) ✔ Dispatch returns response for valid route ✔ Dispatch handles parameterized route ✔ Dispatch throws not found for invalid route ✔ Dispatch throws method not allowed ✔ Resolve parameters returns parameters ✔ Resolve parameters returns null for mismatch Template (ArchersFramework\Tests\Router\Template) ✔ Constructor parses valid template string ✔ Constructor defaults type to string ✔ Constructor throws exception for invalid template ✔ Is value valid returns true for valid int ✔ Is value valid returns false for invalid int ✔ Is value valid returns true for valid float ✔ Is value valid returns false for invalid float ✔ Is value valid returns true for boolean ✔ Is value valid returns false for invalid boolean ✔ Is value valid returns true for string ✔ Get processed value returns int ✔ Get processed value returns float ✔ Get processed value returns bool ✔ Get processed value returns string ✔ Get processed value throws exception for invalid value ULID (Tests\ArchersFramework\Utilities\ULID) ✔ Generated ulid has correct length ✔ Generated ulid has valid characters ✔ Generated ulids are unique ✔ Generated ulid is uppercase by default ✔ Generated ulid can be lowercase ✔ Generated ulid parts are correct ✔ To string method returns expected value ✔ From string with valid ulid ✔ From string with lowercase ulid ✔ From string with invalid ulid throws exception URI ✔ From string valid uri ✔ From string without query and fragment ✔ From string without schema ✔ From string without path ✔ From string invalid uri ✔ To string ✔ From string with port ✔ From string with credentials ✔ From string without credentials FAILURES! Tests: 97, Assertions: 166, Failures: 7. Error: Process completed with exit code 1.

它应该在环境临时目录中创建文件
    

它与我的代码有关。感谢@azeem的回答:)
问题是GitHub Action使用“:” AS

PATH_SEPARATOR

,我只是在处理/".
github testing github-actions phpunit
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.