File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 25
25
26
26
use PHPUnit \Framework \TestCase ;
27
27
use Prophecy \Argument ;
28
- use Psr \Http \Message \RequestInterface ;
29
28
30
29
/**
31
30
* @author Gabriel Polverini <gpolverini_ext@amco.mx>
@@ -42,7 +41,7 @@ class ClientTest extends TestCase
42
41
public function testSendRequest ()
43
42
{
44
43
$ client = new Client ();
45
- $ request = $ this ->prophesize (RequestInterface::class );
44
+ $ request = $ this ->prophesize (' Psr\Http\Message\ RequestInterface' );
46
45
$ request ->getUri ()->willReturn ('http://404.php.net/ ' );
47
46
$ request ->getMethod ()->willReturn (HttpMethod::GET );
48
47
$ client ->sendRequest ($ request ->reveal ());
Original file line number Diff line number Diff line change 25
25
26
26
use PHPUnit \Framework \TestCase ;
27
27
use Prophecy \Argument ;
28
- use Psr \Http \Message \StreamInterface ;
29
- use Psr \Http \Message \UriInterface ;
30
28
31
29
/**
32
30
* @author Gabriel Polverini <gpolverini_ext@amco.mx>
@@ -163,7 +161,7 @@ public function testGetUri()
163
161
public function testWithUri ()
164
162
{
165
163
$ uri = 'www.google.com ' ;
166
- $ uriInterface = $ this ->prophesize (UriInterface::class );
164
+ $ uriInterface = $ this ->prophesize (' Psr\Http\Message\ UriInterface' );
167
165
$ uriInterface ->__toString ()->willReturn ($ uri );
168
166
$ request = new Request (HttpMethod::GET , $ uri );
169
167
$ this ->assertEquals ($ request ->getUri (), (string ) $ request ->withUri ($ uriInterface ->reveal ())->getUri ());
@@ -359,7 +357,7 @@ public function testGetBody()
359
357
public function testWithBody ()
360
358
{
361
359
$ body = '{"message":"text"} ' ;
362
- $ stream = $ this ->prophesize (StreamInterface::class );
360
+ $ stream = $ this ->prophesize (' Psr\Http\Message\ StreamInterface' );
363
361
$ stream ->__toString ()->willReturn ($ body );
364
362
$ this ->assertEquals ($ body , (new Request ())->withBody ($ stream ->reveal ())->getBody ());
365
363
}
Original file line number Diff line number Diff line change 24
24
namespace Matricali \Http ;
25
25
26
26
use PHPUnit \Framework \TestCase ;
27
- use Psr \Http \Message \StreamInterface ;
28
27
29
28
/**
30
29
* @author Gabriel Polverini <gpolverini_ext@amco.mx>
@@ -250,7 +249,7 @@ public function testGetBody()
250
249
public function testWithBody ()
251
250
{
252
251
$ body = '{"message":"text"} ' ;
253
- $ stream = $ this ->prophesize (StreamInterface::class );
252
+ $ stream = $ this ->prophesize (' Psr\Http\Message\ StreamInterface' );
254
253
$ stream ->__toString ()->willReturn ($ body );
255
254
$ this ->assertEquals ($ body , (new Response ('' ))->withBody ($ stream ->reveal ())->getBody ());
256
255
}
You can’t perform that action at this time.
0 commit comments