*/ #[CoversClass(TimesheetAll::class)] #[CoversClass(TimesheetAllValidator::class)] class TimesheetAllValidatorTest extends ConstraintValidatorTestCase { protected function createValidator(): TimesheetAllValidator { return $this->createMyValidator(); } protected function createMyValidator(bool $isGranted = true): TimesheetAllValidator { return new TimesheetAllValidator([]); } public function testConstraintIsInvalid(): void { $this->expectException(UnexpectedTypeException::class); $this->validator->validate(new Timesheet(), new NotBlank()); } public function testInvalidValueThrowsException(): void { $this->expectException(UnexpectedTypeException::class); $this->validator->validate(new NotBlank(), new TimesheetAll()); } }