You are here

protected function AbstractConstraintValidatorTest::setObject in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest::setObject()
3 calls to AbstractConstraintValidatorTest::setObject()
ChoiceValidatorTest::testValidChoiceCallbackContextMethod in vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php
ExpressionValidatorTest::testFailingExpressionAtObjectLevel in vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php
ExpressionValidatorTest::testSucceedingExpressionAtObjectLevel in vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php

File

vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php, line 169

Class

AbstractConstraintValidatorTest
@since 2.5.3

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

protected function setObject($object) {
  $this->object = $object;
  $this->metadata = is_object($object) ? new ClassMetadata(get_class($object)) : null;
  $this->context
    ->setNode($this->value, $this->object, $this->metadata, $this->propertyPath);
}