edmondscommerce /
doctrine-static-meta
| 1 | <?php declare(strict_types=1); |
||
| 2 | |||
| 3 | namespace TemplateNamespace\Validation\Constraints; |
||
| 4 | |||
| 5 | use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; |
||
| 6 | |||
| 7 | class TemplateEntityIsValidConstraintValidatorTest extends ConstraintValidatorTestCase |
||
| 8 | { |
||
| 9 | |||
| 10 | public function invalidValuesAreRaised($value, string $invalidPropertyPath, string $valueAsString): void |
||
| 11 | { |
||
| 12 | $constraint = new TemplateEntityIsValidConstraint( |
||
| 13 | [ |
||
| 14 | 'message' => 'myMessage', |
||
| 15 | ] |
||
| 16 | ); |
||
| 17 | |||
| 18 | $this->validator->validate($value, $constraint); |
||
| 19 | |||
| 20 | $this->buildViolation($constraint->message) |
||
| 21 | ->atPath($invalidPropertyPath) |
||
| 22 | ->setParameter('{{ string }}', $valueAsString) |
||
| 23 | ->addViolation(); |
||
|
0 ignored issues
–
show
|
|||
| 24 | } |
||
| 25 | |||
| 26 | protected function createValidator() |
||
| 27 | { |
||
| 28 | return new TemplateEntityIsValidConstraintValidator(); |
||
| 29 | } |
||
| 30 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.