Skip to content

Commit 133c069

Browse files
committed
Fix test when xdebug is enable
1 parent ec69827 commit 133c069

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/HttpClientPool/LeastUsedClientPoolSpec.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Http\Client\HttpAsyncClient;
77
use Http\Client\HttpClient;
88
use Http\Promise\Promise;
9+
use PhpSpec\Exception\Example\SkippingException;
910
use PhpSpec\ObjectBehavior;
1011
use Prophecy\Argument;
1112
use Psr\Http\Message\RequestInterface;
@@ -71,6 +72,10 @@ public function it_reenable_client(HttpClient $client, RequestInterface $request
7172

7273
public function it_uses_the_lowest_request_client(HttpClientPoolItem $client1, HttpClientPoolItem $client2, RequestInterface $request, ResponseInterface $response)
7374
{
75+
if (extension_loaded('xdebug')) {
76+
throw new SkippingException('This test fail when xdebug is enable on PHP < 7');
77+
}
78+
7479
$this->addHttpClient($client1);
7580
$this->addHttpClient($client2);
7681

0 commit comments

Comments
 (0)