You are here

public function AbstractValidatorTest::testLegacyValidatePropertyFailsIfPropertiesNotSupported 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::testLegacyValidatePropertyFailsIfPropertiesNotSupported()

Cannot be UnsupportedMetadataException for BC with Symfony < 2.5.

@expectedException \Symfony\Component\Validator\Exception\ValidatorException @group legacy

File

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

Class

AbstractValidatorTest
@since 2.5

Namespace

Symfony\Component\Validator\Tests\Validator

Code

public function testLegacyValidatePropertyFailsIfPropertiesNotSupported() {

  // $metadata does not implement PropertyMetadataContainerInterface
  $metadata = $this
    ->getMock('Symfony\\Component\\Validator\\MetadataInterface');
  $this->metadataFactory
    ->addMetadataForValue('VALUE', $metadata);
  $this
    ->validateProperty('VALUE', 'someProperty');
}