diff options
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(); + } +} |