add "duration + fixed start time" tracking mode (#859)

This commit is contained in:
Kevin Papst
2019-06-15 23:04:53 +02:00
committed by GitHub
parent 92f3f4ee57
commit 59d2946b91
36 changed files with 1094 additions and 265 deletions

View File

@@ -15,6 +15,8 @@ use App\Entity\Activity;
use App\Entity\Customer;
use App\Entity\Project;
use App\Entity\Timesheet;
use App\Tests\Mocks\Security\UserDateTimeFactoryFactory;
use App\Timesheet\TrackingModeService;
use App\Validator\Constraints\Timesheet as TimesheetConstraint;
use App\Validator\Constraints\TimesheetValidator;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
@@ -38,8 +40,10 @@ class TimesheetValidatorTest extends ConstraintValidatorTestCase
],
'mode' => 'default',
]);
$dateTime = (new UserDateTimeFactoryFactory($this))->create();
$service = new TrackingModeService($dateTime, $config);
return new TimesheetValidator($authMock, $config);
return new TimesheetValidator($authMock, $config, $service);
}
/**