You are here

public function GetterMetadataTest::testGetPropertyValueFromPublicGetter in Zircon Profile 8

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

File

vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php, line 28

Class

GetterMetadataTest

Namespace

Symfony\Component\Validator\Tests\Mapping

Code

public function testGetPropertyValueFromPublicGetter() {

  // private getters don't work yet because ReflectionMethod::setAccessible()
  // does not exist yet in a stable PHP release
  $entity = new Entity('foobar');
  $metadata = new GetterMetadata(self::CLASSNAME, 'internal');
  $this
    ->assertEquals('foobar from getter', $metadata
    ->getPropertyValue($entity));
}