Skip to content

Commit 56c357d

Browse files
authored
Skip tests on openswoole that require mock response (#429)
1 parent bbbade6 commit 56c357d

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ jobs:
3838
3939
- name: Execute tests
4040
run: vendor/bin/phpunit --verbose
41-
continue-on-error: ${{ matrix.php > 8 && matrix.driver == 'swoole' }}

tests/SwooleClientTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ public function test_respond_method_sends_response_to_swoole()
146146
{
147147
$client = new SwooleClient;
148148

149+
if (extension_loaded('openswoole')) {
150+
$this->markTestSkipped('This test is not compatible with Open Swoole');
151+
}
152+
149153
$swooleResponse = Mockery::mock('Swoole\Http\Response');
150154

151155
$swooleResponse->shouldReceive('status')->once()->with(200);
@@ -165,6 +169,10 @@ public function test_respond_method_send_streamed_response_to_swoole()
165169
{
166170
$client = new SwooleClient;
167171

172+
if (extension_loaded('openswoole')) {
173+
$this->markTestSkipped('This test is not compatible with Open Swoole');
174+
}
175+
168176
$swooleResponse = Mockery::mock('Swoole\Http\Response');
169177

170178
$swooleResponse->shouldReceive('status')->once()->with(200);
@@ -186,6 +194,10 @@ public function test_respond_method_with_laravel_specific_status_code_sends_resp
186194
{
187195
$client = new SwooleClient;
188196

197+
if (extension_loaded('openswoole')) {
198+
$this->markTestSkipped('This test is not compatible with Open Swoole');
199+
}
200+
189201
$swooleResponse = Mockery::mock('Swoole\Http\Response');
190202

191203
$swooleResponse->shouldReceive('status')->once()->with(419, 'Page Expired');
@@ -205,6 +217,10 @@ public function test_error_method_sends_error_response_to_swoole()
205217
{
206218
$client = new SwooleClient;
207219

220+
if (extension_loaded('openswoole')) {
221+
$this->markTestSkipped('This test is not compatible with Open Swoole');
222+
}
223+
208224
$swooleResponse = Mockery::spy('Swoole\Http\Response');
209225

210226
$app = $this->createApplication();
@@ -223,6 +239,10 @@ public function test_error_method_sends_detailed_error_response_to_swoole_in_deb
223239
{
224240
$client = new SwooleClient;
225241

242+
if (extension_loaded('openswoole')) {
243+
$this->markTestSkipped('This test is not compatible with Open Swoole');
244+
}
245+
226246
$swooleResponse = Mockery::spy('Swoole\Http\Response');
227247

228248
$app = $this->createApplication();

0 commit comments

Comments
 (0)