Skip to content

Commit cbb8112

Browse files
committed
+ Fix TDD
1 parent 45339ec commit cbb8112

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

tests/ClientTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
use PHPUnit\Framework\TestCase;
2727
use Prophecy\Argument;
28-
use Psr\Http\Message\RequestInterface;
2928

3029
/**
3130
* @author Gabriel Polverini <gpolverini_ext@amco.mx>
@@ -42,7 +41,7 @@ class ClientTest extends TestCase
4241
public function testSendRequest()
4342
{
4443
$client = new Client();
45-
$request = $this->prophesize(RequestInterface::class);
44+
$request = $this->prophesize('Psr\Http\Message\RequestInterface');
4645
$request->getUri()->willReturn('http://404.php.net/');
4746
$request->getMethod()->willReturn(HttpMethod::GET);
4847
$client->sendRequest($request->reveal());

tests/RequestTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
use PHPUnit\Framework\TestCase;
2727
use Prophecy\Argument;
28-
use Psr\Http\Message\StreamInterface;
29-
use Psr\Http\Message\UriInterface;
3028

3129
/**
3230
* @author Gabriel Polverini <gpolverini_ext@amco.mx>
@@ -163,7 +161,7 @@ public function testGetUri()
163161
public function testWithUri()
164162
{
165163
$uri = 'www.google.com';
166-
$uriInterface = $this->prophesize(UriInterface::class);
164+
$uriInterface = $this->prophesize('Psr\Http\Message\UriInterface');
167165
$uriInterface->__toString()->willReturn($uri);
168166
$request = new Request(HttpMethod::GET, $uri);
169167
$this->assertEquals($request->getUri(), (string) $request->withUri($uriInterface->reveal())->getUri());
@@ -359,7 +357,7 @@ public function testGetBody()
359357
public function testWithBody()
360358
{
361359
$body = '{"message":"text"}';
362-
$stream = $this->prophesize(StreamInterface::class);
360+
$stream = $this->prophesize('Psr\Http\Message\StreamInterface');
363361
$stream->__toString()->willReturn($body);
364362
$this->assertEquals($body, (new Request())->withBody($stream->reveal())->getBody());
365363
}

tests/ResponseTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
namespace Matricali\Http;
2525

2626
use PHPUnit\Framework\TestCase;
27-
use Psr\Http\Message\StreamInterface;
2827

2928
/**
3029
* @author Gabriel Polverini <gpolverini_ext@amco.mx>
@@ -250,7 +249,7 @@ public function testGetBody()
250249
public function testWithBody()
251250
{
252251
$body = '{"message":"text"}';
253-
$stream = $this->prophesize(StreamInterface::class);
252+
$stream = $this->prophesize('Psr\Http\Message\StreamInterface');
254253
$stream->__toString()->willReturn($body);
255254
$this->assertEquals($body, (new Response(''))->withBody($stream->reveal())->getBody());
256255
}

0 commit comments

Comments
 (0)