You are here

public function AbstractValidatorTest::testFailOnScalarReferences in Zircon Profile 8

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

@expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException

File

vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php, line 518

Class

AbstractValidatorTest
@since 2.5

Namespace

Symfony\Component\Validator\Tests\Validator

Code

public function testFailOnScalarReferences() {
  $entity = new Entity();
  $entity->reference = 'string';
  $this->metadata
    ->addPropertyConstraint('reference', new Valid());
  $this
    ->validate($entity);
}