Skip to content

Commit

Permalink
re-enable and fix tests for guzzle integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Mar 3, 2024
1 parent 81e5ef0 commit 96b2881
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"symfony/options-resolver": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"require-dev": {
"guzzlehttp/psr7": "^1.0",
"guzzlehttp/psr7": "^2.0",
"php-http/client-integration-tests": "^3.0",
"phpunit/phpunit": "^7.5 || ^9.4",
"laminas/laminas-diactoros": "^2.0",
Expand Down
6 changes: 0 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

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

<testsuite name="Unit">
Expand All @@ -25,9 +22,6 @@

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

</testsuites>
Expand Down
5 changes: 2 additions & 3 deletions tests/Functional/HttpAsyncClientGuzzleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

namespace Http\Client\Curl\Tests\Functional;

use GuzzleHttp\Psr7\HttpFactory;
use Http\Client\Curl\Client;
use Http\Client\HttpAsyncClient;
use Http\Message\MessageFactory\GuzzleMessageFactory;
use Http\Message\StreamFactory\GuzzleStreamFactory;

/**
* @covers \Http\Client\Curl\Client
Expand All @@ -19,6 +18,6 @@ class HttpAsyncClientGuzzleTest extends HttpAsyncClientTestCase
*/
protected function createHttpAsyncClient(): HttpAsyncClient
{
return new Client(new GuzzleMessageFactory(), new GuzzleStreamFactory());
return new Client(new HttpFactory(), new HttpFactory());
}
}
9 changes: 4 additions & 5 deletions tests/Functional/HttpClientGuzzleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

namespace Http\Client\Curl\Tests\Functional;

use GuzzleHttp\Psr7\HttpFactory;
use GuzzleHttp\Psr7\Stream;
use Http\Client\Curl\Client;
use Http\Client\HttpClient;
use Http\Message\MessageFactory\GuzzleMessageFactory;
use Http\Message\StreamFactory\GuzzleStreamFactory;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\StreamInterface;

/**
Expand All @@ -19,9 +18,9 @@ class HttpClientGuzzleTest extends HttpClientTestCase
/**
* {@inheritdoc}
*/
protected function createHttpAdapter(): HttpClient
protected function createHttpAdapter(): ClientInterface
{
return new Client(new GuzzleMessageFactory(), new GuzzleStreamFactory());
return new Client(new HttpFactory(), new HttpFactory());
}

/**
Expand Down

0 comments on commit 96b2881

Please sign in to comment.