Skip to content

Nyholm missing integration tests #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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 phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</testsuite>

<testsuite name="Nyholm">
<directory>./vendor/nyholm/psr7/tests/Integration/</directory>
<directory>./tests/Nyholm/</directory>
</testsuite>
</testsuites>

Expand Down
14 changes: 14 additions & 0 deletions tests/Nyholm/RequestTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Http\Psr7Test\Tests\Nyholm;

use Http\Psr7Test\RequestIntegrationTest;
use Nyholm\Psr7\Request;

class RequestTest extends RequestIntegrationTest
{
public function createSubject()
{
return new Request('GET', '/');
}
}
14 changes: 14 additions & 0 deletions tests/Nyholm/ResponseTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Http\Psr7Test\Tests\Nyholm;

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

class ResponseTest extends ResponseIntegrationTest
{
public function createSubject()
{
return new Response();
}
}
16 changes: 16 additions & 0 deletions tests/Nyholm/ServerRequestTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Http\Psr7Test\Tests\Nyholm;

use Http\Psr7Test\ServerRequestIntegrationTest;
use Nyholm\Psr7\ServerRequest;

class ServerRequestTest extends ServerRequestIntegrationTest
{
public function createSubject()
{
$_SERVER['REQUEST_METHOD'] = 'GET';

return new ServerRequest('GET', '/', [], null, '1.1', $_SERVER);
}
}
14 changes: 14 additions & 0 deletions tests/Nyholm/StreamTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Http\Psr7Test\Tests\Nyholm;

use Http\Psr7Test\StreamIntegrationTest;
use Nyholm\Psr7\Stream;

class StreamTest extends StreamIntegrationTest
{
public function createStream($data)
{
return Stream::create($data);
}
}
15 changes: 15 additions & 0 deletions tests/Nyholm/UploadedFileTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Http\Psr7Test\Tests\Nyholm;

use Http\Psr7Test\UploadedFileIntegrationTest;
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7\Stream;

class UploadedFileTest extends UploadedFileIntegrationTest
{
public function createSubject()
{
return (new Psr17Factory())->createUploadedFile(Stream::create('writing to tempfile'));
}
}
14 changes: 14 additions & 0 deletions tests/Nyholm/UriTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Http\Psr7Test\Tests\Nyholm;

use Http\Psr7Test\UriIntegrationTest;
use Nyholm\Psr7\Uri;

class UriTest extends UriIntegrationTest
{
public function createUri($uri)
{
return new Uri($uri);
}
}