public function ValidationVisitorTest::testValidateCascadedPropertyRequiresObjectOrArray

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

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/ValidationVisitorTest.php, line 555

Class

ValidationVisitorTest
@author Bernhard Schussek <bschussek@gmail.com>

Namespace

Symfony\Component\Validator\Tests

Code

public function testValidateCascadedPropertyRequiresObjectOrArray() {
  $entity = new Entity();
  $entity->reference = 'no object';
  $this->metadata
    ->addPropertyConstraint('reference', new Valid());
  $this->visitor
    ->validate($entity, 'Default', '');
}