Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"guzzlehttp/psr7": "^1.4",
"nyholm/psr7": "dev-master",
"ringcentral/psr7": "^1.2",
"slim/http": "^0.3",
"slim/psr7": "dev-master",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see there is no branch-alias for master that we can use. then again, if we always test latest its fine i guess.

"zendframework/zend-diactoros": "^1.8"
},
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion src/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use GuzzleHttp\Psr7\Uri as GuzzleUri;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\UriInterface;
use Slim\Http\Uri as SlimUri;
use Slim\Psr7\Uri as SlimUri;
use Zend\Diactoros\Stream as ZendStream;
use Zend\Diactoros\Uri as ZendUri;
use Zend\Diactoros\UploadedFile as ZendUploadedFile;
Expand Down
17 changes: 12 additions & 5 deletions tests/Slim/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
namespace Http\Psr7Test\Tests\Slim;

use Http\Psr7Test\RequestIntegrationTest;
use Slim\Http\Body;
use Slim\Http\Headers;
use Slim\Http\Request;
use Slim\Http\Uri;
use Slim\Psr7\Factory\StreamFactory;
use Slim\Psr7\Factory\UriFactory;
use Slim\Psr7\Headers;
use Slim\Psr7\Request;

class RequestTest extends RequestIntegrationTest
{
public function createSubject()
{
return new Request('GET', new Uri('http', 'foo.com'), new Headers([]), [], [], new Body(fopen('php://temp', 'r+')));
return new Request(
'GET',
(new UriFactory())->createUri('/'),
new Headers([]),
[],
[],
(new StreamFactory())->createStream()
);
}
}
2 changes: 1 addition & 1 deletion tests/Slim/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Http\Psr7Test\Tests\Slim;

use Http\Psr7Test\ResponseIntegrationTest;
use Slim\Http\Response;
use Slim\Psr7\Response;

class ResponseTest extends ResponseIntegrationTest
{
Expand Down
17 changes: 12 additions & 5 deletions tests/Slim/ServerRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@

namespace Http\Psr7Test\Tests\Slim;

use Slim\Http\Body;
use Slim\Http\Headers;
use Slim\Http\Request;
use Slim\Http\Uri;
use Slim\Psr7\Factory\StreamFactory;
use Slim\Psr7\Factory\UriFactory;
use Slim\Psr7\Headers;
use Slim\Psr7\Request;
use Http\Psr7Test\ServerRequestIntegrationTest;

class ServerRequestTest extends ServerRequestIntegrationTest
{
public function createSubject()
{
return new Request('GET', new Uri('http', 'foo.com'), new Headers([]), $_COOKIE, $_SERVER, new Body(fopen('php://temp', 'r+')));
return new Request(
'GET',
(new UriFactory())->createUri('/'),
new Headers([]),
$_COOKIE,
$_SERVER,
(new StreamFactory())->createStream()
);
}
}
2 changes: 1 addition & 1 deletion tests/Slim/StreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Http\Psr7Test\StreamIntegrationTest;
use Psr\Http\Message\StreamInterface;
use Slim\Http\Stream;
use Slim\Psr7\Stream;

class StreamTest extends StreamIntegrationTest
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Slim/UploadedFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Http\Psr7Test\Tests\Slim;

use Http\Psr7Test\UploadedFileIntegrationTest;
use Slim\Http\UploadedFile;
use Slim\Psr7\UploadedFile;

class UploadedFileTest extends UploadedFileIntegrationTest
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Slim/UriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace Http\Psr7Test\Tests\Slim;

use Http\Psr7Test\UriIntegrationTest;
use Slim\Http\Uri;
use Slim\Psr7\Factory\UriFactory;

class UriTest extends UriIntegrationTest
{
public function createUri($uri)
{
return Uri::createFromString($uri);
return (new UriFactory())->createUri($uri);
}
}