Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Mar 2, 2016
1 parent 8d09cc6 commit 5ab60e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
"require-dev": {
"ext-curl": "*",
"php-http/adapter-integration-tests": "^0.4",
"guzzlehttp/ringphp": "^1.1",
"php-http/client-common": "^1.0",
"guzzlehttp/psr7": "^1.2",
"puli/composer-plugin": "1.0.0-beta9"
"guzzlehttp/ringphp": "^1.1"
},
"provide": {
"php-http/client-implementation": "1.0"
Expand Down
3 changes: 2 additions & 1 deletion tests/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use GuzzleHttp\Psr7\Request as Psr7Request;
use GuzzleHttp\Stream\Stream;
use Http\Adapter\Guzzle5\Client;
use Http\Message\MessageFactory\GuzzleMessageFactory;

/**
* @author Tobias Nyholm <[email protected]>
Expand All @@ -30,7 +31,7 @@ protected function makeRequest(GuzzleExceptions\TransferException $exception)
$client->expects($this->any())->method('createRequest')->willReturn($this->guzzleRequest);

$request = new Psr7Request('GET', 'http://foo.com');
(new Client($client))->sendRequest($request);
(new Client($client, new GuzzleMessageFactory()))->sendRequest($request);
}

public function testConnectException()
Expand Down
6 changes: 5 additions & 1 deletion tests/HttpAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle5\Client;
use Http\Client\Tests\HttpClientTest;
use Http\Message\MessageFactory\GuzzleMessageFactory;

/**
* @author GeLo <[email protected]>
Expand All @@ -16,7 +17,10 @@ abstract class HttpAdapterTest extends HttpClientTest
*/
protected function createHttpAdapter()
{
return new Client(new GuzzleClient(['handler' => $this->createHandler()]));
return new Client(
new GuzzleClient(['handler' => $this->createHandler()]),
new GuzzleMessageFactory()
);
}

/**
Expand Down

0 comments on commit 5ab60e8

Please sign in to comment.