rounding rules via admin screen, round begin when starting record (#1229)

This commit is contained in:
Kevin Papst
2019-11-10 13:57:05 +01:00
committed by GitHub
parent fa1c79e15c
commit c6c4098759
47 changed files with 1100 additions and 185 deletions

View File

@@ -10,7 +10,9 @@
namespace App\Tests\Timesheet\TrackingMode;
use App\Configuration\TimesheetConfiguration;
use App\Entity\Timesheet;
use App\Tests\Configuration\TestConfigLoader;
use App\Tests\Mocks\RoundingServiceFactory;
use App\Tests\Mocks\Security\UserDateTimeFactoryFactory;
use App\Timesheet\TrackingMode\DefaultMode;
@@ -19,6 +21,12 @@ use App\Timesheet\TrackingMode\DefaultMode;
*/
class DefaultModeTest extends AbstractTrackingModeTest
{
protected function assertDefaultBegin(Timesheet $timesheet)
{
self::assertNotNull($timesheet->getBegin());
self::assertInstanceOf(\DateTime::class, $timesheet->getBegin());
}
/**
* @return DefaultMode
*/
@@ -28,7 +36,7 @@ class DefaultModeTest extends AbstractTrackingModeTest
$dateTime = (new UserDateTimeFactoryFactory($this))->create();
$configuration = new TimesheetConfiguration($loader, ['default_begin' => '13:47']);
return new DefaultMode($dateTime, $configuration);
return new DefaultMode($dateTime, $configuration, (new RoundingServiceFactory($this))->create());
}
public function testDefaultValues()