rounding rules via admin screen, round begin when starting record (#1229)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user