api-erstellen #1
@@ -44,16 +44,16 @@ class WorkingHoursViewControllerTest extends Unit
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
TorstenHettstedt marked this conversation as resolved
|
|||||||
/**
|
/**
|
||||||
|
* @throws NotDatabasesException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
TorstenHettstedt marked this conversation as resolved
TorstenHettstedt
commented
Eine fehlende Datenbank sollte schon in der Erstellung des Objektes einen Fehler auslösen. Eine fehlende Datenbank sollte schon in der Erstellung des Objektes einen Fehler auslösen.
|
|||||||
public function testBrowseMonthlyWithNonDatabase(): void
|
public function testConstructWithNonDatabase(): void
|
||||||
{
|
{
|
||||||
$this->container = $this->makeEmpty(ContainerInterface::class, [
|
$this->container = $this->makeEmpty(ContainerInterface::class, [
|
||||||
'has' => false
|
'has' => false
|
||||||
]);
|
]);
|
||||||
$controller = new WorkingHoursViewController($this->container);
|
|
||||||
$this->expectException(NotDatabasesException::class);
|
$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);
|
$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
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@@ -89,19 +76,6 @@ class WorkingHoursViewControllerTest extends Unit
|
|||||||
$this->assertInstanceOf(Response::class, $response);
|
$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
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user
Zur Vereinfachung der Klasse soolte es den folgenden Test geben: