Skip to content

Commit 96b2881

Browse files
committed
re-enable and fix tests for guzzle integration
1 parent 81e5ef0 commit 96b2881

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"symfony/options-resolver": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
2626
},
2727
"require-dev": {
28-
"guzzlehttp/psr7": "^1.0",
28+
"guzzlehttp/psr7": "^2.0",
2929
"php-http/client-integration-tests": "^3.0",
3030
"phpunit/phpunit": "^7.5 || ^9.4",
3131
"laminas/laminas-diactoros": "^2.0",

phpunit.xml.dist

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
<testsuite name="All">
1616
<directory>tests</directory>
17-
<!-- Exclude till https://github.com/php-http/message/issues/105 resolved. -->
18-
<exclude>tests/Functional/HttpAsyncClientGuzzleTest.php</exclude>
19-
<exclude>tests/Functional/HttpClientGuzzleTest.php</exclude>
2017
</testsuite>
2118

2219
<testsuite name="Unit">
@@ -25,9 +22,6 @@
2522

2623
<testsuite name="Functional">
2724
<directory>tests/Functional</directory>
28-
<!-- Exclude till https://github.com/php-http/message/issues/105 resolved. -->
29-
<exclude>tests/Functional/HttpAsyncClientGuzzleTest.php</exclude>
30-
<exclude>tests/Functional/HttpClientGuzzleTest.php</exclude>
3125
</testsuite>
3226

3327
</testsuites>

tests/Functional/HttpAsyncClientGuzzleTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
namespace Http\Client\Curl\Tests\Functional;
66

7+
use GuzzleHttp\Psr7\HttpFactory;
78
use Http\Client\Curl\Client;
89
use Http\Client\HttpAsyncClient;
9-
use Http\Message\MessageFactory\GuzzleMessageFactory;
10-
use Http\Message\StreamFactory\GuzzleStreamFactory;
1110

1211
/**
1312
* @covers \Http\Client\Curl\Client
@@ -19,6 +18,6 @@ class HttpAsyncClientGuzzleTest extends HttpAsyncClientTestCase
1918
*/
2019
protected function createHttpAsyncClient(): HttpAsyncClient
2120
{
22-
return new Client(new GuzzleMessageFactory(), new GuzzleStreamFactory());
21+
return new Client(new HttpFactory(), new HttpFactory());
2322
}
2423
}

tests/Functional/HttpClientGuzzleTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
namespace Http\Client\Curl\Tests\Functional;
66

7+
use GuzzleHttp\Psr7\HttpFactory;
78
use GuzzleHttp\Psr7\Stream;
89
use Http\Client\Curl\Client;
9-
use Http\Client\HttpClient;
10-
use Http\Message\MessageFactory\GuzzleMessageFactory;
11-
use Http\Message\StreamFactory\GuzzleStreamFactory;
10+
use Psr\Http\Client\ClientInterface;
1211
use Psr\Http\Message\StreamInterface;
1312

1413
/**
@@ -19,9 +18,9 @@ class HttpClientGuzzleTest extends HttpClientTestCase
1918
/**
2019
* {@inheritdoc}
2120
*/
22-
protected function createHttpAdapter(): HttpClient
21+
protected function createHttpAdapter(): ClientInterface
2322
{
24-
return new Client(new GuzzleMessageFactory(), new GuzzleStreamFactory());
23+
return new Client(new HttpFactory(), new HttpFactory());
2524
}
2625

2726
/**

0 commit comments

Comments
 (0)