You are here

public function ExpressionValidatorTest::testSucceedingExpressionAtPropertyLevelWithoutRoot in Plug 7

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

File

lib/Symfony/validator/Symfony/Component/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();
}