From 9e35ab3b0720d5ec1fb96097b5786cc596e04aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20L=C3=BCcke?= Date: Wed, 7 Apr 2021 12:20:14 +0200 Subject: [PATCH] =?UTF-8?q?Eine=20fehlende=20Datenbank=20sollt=20schon=20i?= =?UTF-8?q?n=20der=20Erstellung=20des=20Objektes=20einen=20Fehler=20ausl?= =?UTF-8?q?=C3=B6sen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkingHoursViewControllerTest.php | 32 ++----------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/api/tests/unit/Controller/WorkingHoursViewControllerTest.php b/api/tests/unit/Controller/WorkingHoursViewControllerTest.php index 56c431f..fa2ca2f 100644 --- a/api/tests/unit/Controller/WorkingHoursViewControllerTest.php +++ b/api/tests/unit/Controller/WorkingHoursViewControllerTest.php @@ -44,16 +44,16 @@ class WorkingHoursViewControllerTest extends Unit } /** + * @throws NotDatabasesException * @throws Exception */ - public function testBrowseMonthlyWithNonDatabase(): void + public function testConstructWithNonDatabase(): void { $this->container = $this->makeEmpty(ContainerInterface::class, [ 'has' => false ]); - $controller = new WorkingHoursViewController($this->container); $this->expectException(NotDatabasesException::class); - $controller->browseMonthly($this->request, $this->response, []); + new WorkingHoursViewController($this->container); } /** @@ -66,19 +66,6 @@ class WorkingHoursViewControllerTest extends Unit $this->assertInstanceOf(Response::class, $response); } - /** - * @throws Exception - */ - public function testBrowseYearlyWithNonDatabase(): void - { - $this->container = $this->makeEmpty(ContainerInterface::class, [ - 'has' => false - ]); - $controller = new WorkingHoursViewController($this->container); - $this->expectException(NotDatabasesException::class); - $controller->browseYearly($this->request, $this->response, []); - } - /** * @throws Exception */ @@ -89,19 +76,6 @@ class WorkingHoursViewControllerTest extends Unit $this->assertInstanceOf(Response::class, $response); } - /** - * @throws Exception - */ - public function testBrowseWeeklyWithNonDatabase(): void - { - $this->container = $this->makeEmpty(ContainerInterface::class, [ - 'has' => false - ]); - $controller = new WorkingHoursViewController($this->container); - $this->expectException(NotDatabasesException::class); - $controller->browseWeekly($this->request, $this->response, []); - } - /** * @throws Exception */