Erweitere die Tests
This commit is contained in:
@@ -4,6 +4,7 @@ namespace TorstenHettstedt\TimekeepingApi\Tests\Unit\Controller;
|
||||
|
||||
use Codeception\Attribute\DataProvider;
|
||||
use Exception;
|
||||
use PHPUnit\Framework\MockObject\Exception as MockException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
@@ -25,16 +26,16 @@ class WorkingHoursControllerTest extends AbstractControllerTest
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PHPUnit\Framework\MockObject\Exception
|
||||
* @throws MockException
|
||||
*/
|
||||
protected function _before(): void
|
||||
{
|
||||
parent::_before();
|
||||
$this->request = $this->makeEmpty(Request::class, [
|
||||
'getParsedBody' => [
|
||||
'workingDay' => self::EXISTING_DATE,
|
||||
'workingTime' => self::EXISTING_INTERVAL,
|
||||
'isHomeOfficeDay' => true,
|
||||
'workingDay' => self::EXISTING_DATE,
|
||||
'workingTime' => self::EXISTING_INTERVAL,
|
||||
'isHomeOffice' => true,
|
||||
],
|
||||
]);
|
||||
}
|
||||
@@ -271,8 +272,8 @@ class WorkingHoursControllerTest extends AbstractControllerTest
|
||||
{
|
||||
$this->request = $this->makeEmpty(Request::class, [
|
||||
'getParsedBody' => [
|
||||
'workingDay' => self::EXISTING_DATE,
|
||||
'workingTime' => self::EXISTING_INTERVAL,
|
||||
'workingDay' => self::EXISTING_DATE,
|
||||
'workingTime' => self::EXISTING_INTERVAL,
|
||||
],
|
||||
]);
|
||||
$controller = new WorkingHoursController($this->container);
|
||||
@@ -316,9 +317,6 @@ class WorkingHoursControllerTest extends AbstractControllerTest
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $date
|
||||
* @param string $time
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotDatabasesException
|
||||
* @throws NotFoundExceptionInterface
|
||||
@@ -329,9 +327,9 @@ class WorkingHoursControllerTest extends AbstractControllerTest
|
||||
{
|
||||
$this->request = $this->makeEmpty(Request::class, [
|
||||
'getParsedBody' => [
|
||||
'workingDay' => $date,
|
||||
'workingTime' => $time,
|
||||
'isHomeOfficeDay' => $isHomeOffice,
|
||||
'workingDay' => $date,
|
||||
'workingTime' => $time,
|
||||
'isHomeOffice' => $isHomeOffice,
|
||||
],
|
||||
]);
|
||||
$controller = new WorkingHoursController($this->container);
|
||||
@@ -349,9 +347,9 @@ class WorkingHoursControllerTest extends AbstractControllerTest
|
||||
{
|
||||
$this->request = $this->makeEmpty(Request::class, [
|
||||
'getParsedBody' => [
|
||||
'workingDay' => self::NEW_DATE,
|
||||
'workingTime' => self::NEW_INTERVAL,
|
||||
'isHomeOfficeDay' => true,
|
||||
'workingDay' => self::NEW_DATE,
|
||||
'workingTime' => self::NEW_INTERVAL,
|
||||
'isHomeOffice' => true,
|
||||
],
|
||||
]);
|
||||
$controller = new WorkingHoursController($this->container);
|
||||
@@ -370,8 +368,8 @@ class WorkingHoursControllerTest extends AbstractControllerTest
|
||||
{
|
||||
$this->request = $this->makeEmpty(Request::class, [
|
||||
'getParsedBody' => [
|
||||
'workingDay' => self::NEW_DATE,
|
||||
'workingTime' => self::NEW_INTERVAL,
|
||||
'workingDay' => self::NEW_DATE,
|
||||
'workingTime' => self::NEW_INTERVAL,
|
||||
],
|
||||
]);
|
||||
$controller = new WorkingHoursController($this->container);
|
||||
@@ -390,9 +388,9 @@ class WorkingHoursControllerTest extends AbstractControllerTest
|
||||
{
|
||||
$this->request = $this->makeEmpty(Request::class, [
|
||||
'getParsedBody' => [
|
||||
'workingDay' => self::EXISTING_DATE,
|
||||
'workingTime' => self::EXISTING_INTERVAL,
|
||||
'isHomeOfficeDay' => true,
|
||||
'workingDay' => self::EXISTING_DATE,
|
||||
'workingTime' => self::EXISTING_INTERVAL,
|
||||
'isHomeOffice' => true,
|
||||
],
|
||||
]);
|
||||
$controller = new WorkingHoursController($this->container);
|
||||
|
||||
Reference in New Issue
Block a user