From e06affae179dfeb41f77d8ad2ea81fa3f2fa439d Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Fri, 14 Jun 2019 04:05:38 +0200 Subject: Added tests to HomeController --- tests/Unit/Controllers/HomeControllerTest.php | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/Unit/Controllers/HomeControllerTest.php (limited to 'tests/Unit/Controllers') diff --git a/tests/Unit/Controllers/HomeControllerTest.php b/tests/Unit/Controllers/HomeControllerTest.php new file mode 100644 index 00000000..56bb1995 --- /dev/null +++ b/tests/Unit/Controllers/HomeControllerTest.php @@ -0,0 +1,30 @@ + '/foo']); + /** @var Authenticator|MockObject $auth */ + $auth = $this->createMock(Authenticator::class); + $this->setExpects($auth, 'user', null, true); + + $controller = new HomeController($auth, $config); + + $this->expectException(HttpTemporaryRedirect::class); + $controller->index(); + } +} -- cgit v1.2.3-70-g09d2