summaryrefslogtreecommitdiff
path: root/tests/Unit/Http
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-02 02:09:56 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-02 02:09:56 +0200
commit9e217d87c095170460a8580d5215ddf7cbe639f4 (patch)
tree3b426fe52e70ef0f1395edcb354f1be4788ca329 /tests/Unit/Http
parentac48332166ce28fcb1a2fc130c7f5adbc760e42d (diff)
Template refactoring to use twig
Diffstat (limited to 'tests/Unit/Http')
-rw-r--r--tests/Unit/Http/RequestServiceProviderTest.php9
-rw-r--r--tests/Unit/Http/ResponseServiceProviderTest.php9
2 files changed, 16 insertions, 2 deletions
diff --git a/tests/Unit/Http/RequestServiceProviderTest.php b/tests/Unit/Http/RequestServiceProviderTest.php
index a137b0ac..1a42ae86 100644
--- a/tests/Unit/Http/RequestServiceProviderTest.php
+++ b/tests/Unit/Http/RequestServiceProviderTest.php
@@ -6,6 +6,7 @@ use Engelsystem\Http\Request;
use Engelsystem\Http\RequestServiceProvider;
use Engelsystem\Test\Unit\ServiceProviderTest;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
+use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
class RequestServiceProviderTest extends ServiceProviderTest
{
@@ -21,7 +22,13 @@ class RequestServiceProviderTest extends ServiceProviderTest
$app = $this->getApp(['call', 'instance']);
$this->setExpects($app, 'call', [[Request::class, 'createFromGlobals']], $request);
- $this->setExpects($app, 'instance', ['request', $request]);
+ $app->expects($this->exactly(3))
+ ->method('instance')
+ ->withConsecutive(
+ [Request::class, $request],
+ [SymfonyRequest::class, $request],
+ ['request', $request]
+ );
$serviceProvider = new RequestServiceProvider($app);
$serviceProvider->register();
diff --git a/tests/Unit/Http/ResponseServiceProviderTest.php b/tests/Unit/Http/ResponseServiceProviderTest.php
index 52e95714..6ce1f4fe 100644
--- a/tests/Unit/Http/ResponseServiceProviderTest.php
+++ b/tests/Unit/Http/ResponseServiceProviderTest.php
@@ -6,6 +6,7 @@ use Engelsystem\Http\Response;
use Engelsystem\Http\ResponseServiceProvider;
use Engelsystem\Test\Unit\ServiceProviderTest;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
+use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
class ResponseServiceProviderTest extends ServiceProviderTest
{
@@ -21,7 +22,13 @@ class ResponseServiceProviderTest extends ServiceProviderTest
$app = $this->getApp();
$this->setExpects($app, 'make', [Response::class], $response);
- $this->setExpects($app, 'instance', ['response', $response]);
+ $app->expects($this->exactly(3))
+ ->method('instance')
+ ->withConsecutive(
+ [Response::class, $response],
+ [SymfonyResponse::class, $response],
+ ['response', $response]
+ );
$serviceProvider = new ResponseServiceProvider($app);
$serviceProvider->register();