summaryrefslogtreecommitdiff
path: root/tests/Unit
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-04-17 10:09:50 +0200
committermsquare <msquare@notrademark.de>2019-04-17 13:11:39 +0200
commit58ca7113f3cd3158a8ae1b02853ece0c4dba4eda (patch)
tree59d1dd3ef685027d312909acd314d9e33c3fa1d2 /tests/Unit
parentd7ad7b0b13368ef7f3aa10209935f163dc58aa57 (diff)
PSR-7: Replaced implementation with `Nyholm\Psr7`
Diffstat (limited to 'tests/Unit')
-rw-r--r--tests/Unit/Http/MessageTraitRequestTest.php4
-rw-r--r--tests/Unit/Http/MessageTraitResponseTest.php4
-rw-r--r--tests/Unit/Http/RequestTest.php4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/Unit/Http/MessageTraitRequestTest.php b/tests/Unit/Http/MessageTraitRequestTest.php
index c3d99afb..31ba249f 100644
--- a/tests/Unit/Http/MessageTraitRequestTest.php
+++ b/tests/Unit/Http/MessageTraitRequestTest.php
@@ -3,7 +3,7 @@
namespace Engelsystem\Test\Unit\Http;
use Engelsystem\Test\Unit\Http\Stub\MessageTraitRequestImplementation;
-use PhpExtended\HttpMessage\StringStream;
+use Nyholm\Psr7\Stream;
use PHPUnit\Framework\TestCase;
class MessageTraitRequestTest extends TestCase
@@ -36,7 +36,7 @@ class MessageTraitRequestTest extends TestCase
*/
public function testWithBody()
{
- $stream = new StringStream('Test content');
+ $stream = Stream::create('Test content');
$message = new MessageTraitRequestImplementation();
$newMessage = $message->withBody($stream);
diff --git a/tests/Unit/Http/MessageTraitResponseTest.php b/tests/Unit/Http/MessageTraitResponseTest.php
index 31b529ee..9174eadd 100644
--- a/tests/Unit/Http/MessageTraitResponseTest.php
+++ b/tests/Unit/Http/MessageTraitResponseTest.php
@@ -3,7 +3,7 @@
namespace Engelsystem\Test\Unit\Http;
use Engelsystem\Test\Unit\Http\Stub\MessageTraitResponseImplementation;
-use PhpExtended\HttpMessage\StringStream;
+use Nyholm\Psr7\Stream;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\MessageInterface;
use Psr\Http\Message\StreamInterface;
@@ -145,7 +145,7 @@ class MessageTraitResponseTest extends TestCase
*/
public function testWithBody()
{
- $stream = new StringStream('Test content');
+ $stream = Stream::create('Test content');
$message = new MessageTraitResponseImplementation();
$newMessage = $message->withBody($stream);
diff --git a/tests/Unit/Http/RequestTest.php b/tests/Unit/Http/RequestTest.php
index 8210d583..df171905 100644
--- a/tests/Unit/Http/RequestTest.php
+++ b/tests/Unit/Http/RequestTest.php
@@ -3,7 +3,7 @@
namespace Engelsystem\Test\Unit\Http;
use Engelsystem\Http\Request;
-use PhpExtended\HttpMessage\UploadedFile;
+use Nyholm\Psr7\UploadedFile;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
use Psr\Http\Message\RequestInterface;
@@ -307,7 +307,7 @@ class RequestTest extends TestCase
{
$filename = tempnam(sys_get_temp_dir(), 'test');
file_put_contents($filename, 'LoremIpsum!');
- $file = new UploadedFile('test.txt', $filename, 'text/plain', 11, UPLOAD_ERR_OK);
+ $file = new UploadedFile($filename, 11, UPLOAD_ERR_OK, 'test.txt', 'text/plain');
$request = new Request();
$new = $request->withUploadedFiles([$file]);