api-erstellen #1
@@ -86,6 +86,7 @@ class WorkingHoursRepository implements RepositoryReaderInterface, RepositoryWri
|
||||
* @param WorkingHours|ModelInterface $model
|
||||
*
|
||||
* @throws RepositoryModelAlreadyExists
|
||||
* @throws Exception
|
||||
*/
|
||||
public function insert(mixed $model): void
|
||||
{
|
||||
|
||||
@@ -33,6 +33,9 @@ class WorkingHoursRepositoryTest extends Unit
|
||||
parent::_before();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function testFindAll(): void
|
||||
{
|
||||
$repository = new WorkingHoursRepository($this->pdoObject);
|
||||
@@ -139,6 +142,10 @@ class WorkingHoursRepositoryTest extends Unit
|
||||
$repository->findByKey(self::EXISTING_DATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RepositoryRecordNotFoundException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function testNotExistsDelete(): void
|
||||
{
|
||||
$repository = new WorkingHoursRepository($this->pdoObject);
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace TorstenHettstedt\TimekeepingApi\Tests\Unit\Repositories;
|
||||
use Codeception\Test\Unit;
|
||||
use DateTime;
|
||||
use DateTimeZone;
|
||||
use Exception;
|
||||
use PDO;
|
||||
use TorstenHettstedt\TimekeepingApi\Models\WorkingHoursView;
|
||||
use TorstenHettstedt\TimekeepingApi\Repositories\RepositoryRecordNotFoundException;
|
||||
@@ -37,6 +38,7 @@ class WorkingHoursViewRepositoryTest extends Unit
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @throws Exception
|
||||
*/
|
||||
public function existingObjectProvider(): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user