Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -10,9 +10,9 @@
|
||||
namespace App\Tests\Validator\Constraints;
|
||||
|
||||
use App\Configuration\ConfigLoaderInterface;
|
||||
use App\Configuration\SystemConfiguration;
|
||||
use App\Entity\Timesheet;
|
||||
use App\Repository\TimesheetRepository;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use App\Validator\Constraints\TimesheetOverlapping;
|
||||
use App\Validator\Constraints\TimesheetOverlappingValidator;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
@@ -33,7 +33,7 @@ class TimesheetOverlappingValidatorTest extends ConstraintValidatorTestCase
|
||||
protected function createMyValidator(bool $allowOverlappingRecords = false, bool $hasRecords = true)
|
||||
{
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = new SystemConfiguration($loader, [
|
||||
$config = SystemConfigurationFactory::create($loader, [
|
||||
'timesheet' => [
|
||||
'rules' => [
|
||||
'allow_overlapping_records' => $allowOverlappingRecords,
|
||||
@@ -71,7 +71,7 @@ class TimesheetOverlappingValidatorTest extends ConstraintValidatorTestCase
|
||||
$this->validator->validate($timesheet, new TimesheetOverlapping(['message' => 'myMessage']));
|
||||
|
||||
$this->buildViolation('You already have an entry for this time.')
|
||||
->atPath('property.path.begin')
|
||||
->atPath('property.path.begin_date')
|
||||
->setCode(TimesheetOverlapping::RECORD_OVERLAPPING)
|
||||
->assertRaised();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user