diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-02 02:13:18 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-03 15:42:51 +0200 |
commit | 9d34f371cb9c5ab0d60bd3158678b9cc9da6cc80 (patch) | |
tree | bdf8d9a039fb8e73652e539f7fb33856025e5bb7 /tests/Unit/Controllers | |
parent | 9e217d87c095170460a8580d5215ddf7cbe639f4 (diff) |
Added CreditsController
Diffstat (limited to 'tests/Unit/Controllers')
-rw-r--r-- | tests/Unit/Controllers/CreditsControllerTest.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/Unit/Controllers/CreditsControllerTest.php b/tests/Unit/Controllers/CreditsControllerTest.php new file mode 100644 index 00000000..6f0200f2 --- /dev/null +++ b/tests/Unit/Controllers/CreditsControllerTest.php @@ -0,0 +1,28 @@ +<?php + +namespace Unit\Controllers; + +use Engelsystem\Controllers\CreditsController; +use Engelsystem\Http\Response; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class CreditsControllerTest extends TestCase +{ + /** + * @covers \Engelsystem\Controllers\CreditsController::__construct + * @covers \Engelsystem\Controllers\CreditsController::index + */ + public function testIndex() + { + /** @var Response|MockObject $response */ + $response = $this->createMock(Response::class); + + $response->expects($this->once()) + ->method('withView') + ->with('pages/credits.twig'); + + $controller = new CreditsController($response); + $controller->index(); + } +} |