class PropertyMetadataTest extends TestCase
{ private const CLASSNAME = Entity::
class;
private const CLASSNAME_74 = 'Symfony\Component\Validator\Tests\Fixtures\Entity_74';
private const CLASSNAME_74_PROXY = 'Symfony\Component\Validator\Tests\Fixtures\Entity_74_Proxy';
private const PARENTCLASS = EntityParent::
class;
public function testInvalidPropertyName() { $this->
expectException(ValidatorException::
class);
new PropertyMetadata(self::CLASSNAME, 'foobar'
);
} public function testGetPropertyValueFromPrivateProperty() { $entity =
new Entity('foobar'
);
$metadata =
new PropertyMetadata(self::CLASSNAME, 'internal'
);
$this->
assertEquals('foobar',
$metadata->
getPropertyValue($entity));
} public function testGetPropertyValueFromOverriddenPrivateProperty() {