You are here

public function ExpressionValidatorTest::testSucceedingExpressionAtPropertyLevelWithoutRoot in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\ExpressionValidatorTest::testSucceedingExpressionAtPropertyLevelWithoutRoot()

When validatePropertyValue() is called with a class name https://github.com/symfony/symfony/pull/11498.

File

vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php, line 179

Class

ExpressionValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testSucceedingExpressionAtPropertyLevelWithoutRoot() {
  $constraint = new Expression('value == "1"');
  $this
    ->setRoot('1');
  $this
    ->setPropertyPath('');
  $this
    ->setProperty(null, 'property');
  $this->validator
    ->validate('1', $constraint);
  $this
    ->assertNoViolation();
}