You are here

public function AbstractValidatorTest::testLegacyValidatePropertyFailsIfPropertiesNotSupported in Plug 7

Cannot be UnsupportedMetadataException for BC with Symfony < 2.5.

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

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php, line 845

Class

AbstractValidatorTest
@since 2.5 @author Bernhard Schussek <bschussek@gmail.com>

Namespace

Symfony\Component\Validator\Tests\Validator

Code

public function testLegacyValidatePropertyFailsIfPropertiesNotSupported() {
  $this
    ->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

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