Eine fehlende Datenbank sollt schon in der Erstellung des Objektes einen Fehler auslösen.
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user