function AssertingContextualValidator::doAtPath
Return value
$this
File
-
vendor/
symfony/ validator/ Test/ ConstraintValidatorTestCase.php, line 478
Class
- AssertingContextualValidator
- @internal
Namespace
Symfony\Component\Validator\TestCode
public function doAtPath(string $path) : static {
Assert::assertFalse($this->expectNoValidate, 'No validation calls have been expected.');
if (!isset($this->expectedAtPath[++$this->atPathCalls])) {
throw new ExpectationFailedException(\sprintf('Validation for property path "%s" was not expected.', $path));
}
$expectedPath = $this->expectedAtPath[$this->atPathCalls];
unset($this->expectedAtPath[$this->atPathCalls]);
Assert::assertSame($expectedPath, $path);
return $this;
}