Skip to content

Commit 6dd6d49

Browse files
committed
单元测试
1 parent 0cfbbf2 commit 6dd6d49

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: tests
33
on:
44
push:
55
branches:
6-
- 5.0
6+
- "5.0"
77
pull_request:
88

99
jobs:
@@ -13,9 +13,9 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [ubuntu-latest, macos-latest, windows-latest]
17-
php: ["8.1", "8.2", "8.3", "8.4"]
18-
stability: [prefer-lowest, prefer-stable]
16+
os: [ ubuntu-latest, macos-latest, windows-latest ]
17+
php: [ "8.2", "8.3", "8.4" ]
18+
stability: [ prefer-lowest, prefer-stable ]
1919

2020
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
2121

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
}
1010
],
1111
"require": {
12+
"php": ">=8.2",
1213
"workerman/workerman": "^4.2",
1314
"topthink/framework": "^8.0"
1415
},
@@ -29,7 +30,6 @@
2930
},
3031
"require-dev": {
3132
"pestphp/pest": "^3.7",
32-
"mockery/mockery": "^1.6",
3333
"guzzlehttp/guzzle": "^7.0",
3434
"phpstan/phpstan": "^2.0"
3535
},

tests/HttpTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
beforeAll(function () use (&$process) {
99
$process = new Process(['php', 'think', 'worker'], __DIR__ . '/stub/');
1010
$process->start();
11-
usleep(250000);
11+
while (!$process->getOutput()) {
12+
sleep(1);
13+
}
1214
});
1315

1416
afterAll(function () use (&$process) {

0 commit comments

Comments
 (0)