diff options
Diffstat (limited to 'tests/Router/Runner/PhpScriptTest.php')
-rw-r--r-- | tests/Router/Runner/PhpScriptTest.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/Router/Runner/PhpScriptTest.php b/tests/Router/Runner/PhpScriptTest.php index 12b9219..2f31f73 100644 --- a/tests/Router/Runner/PhpScriptTest.php +++ b/tests/Router/Runner/PhpScriptTest.php @@ -17,18 +17,14 @@ class PhpScriptTest extends PHPUnit_Framework_TestCase public function testPhpScript($route, $positive) { $runner = new PhpScript($route); - $this->assertEquals($route, $runner->getRoute(), "Route was not set correctly"); $request = $this->createMock(ServerRequestInterface::class); $response = $this->createMock(ResponseInterface::class); + $request->expects($this->once())->method('getAttribute')->with($this->equalTo('route'))->will($this->returnValue($route)); if (!$positive) $this->expectException(\RuntimeException::class); $result = $runner->run($request, $response); - if (!$positive) return; - - $this->assertEquals($runner->getRoute()->file, (string)$runner); - if ($route->type === 'returnTrue') { $this->assertEquals($response, $result, "Request object was not returned as result"); } else { |