ProtobufTest\TestCase::getPropertyValue PHP Method

getPropertyValue() protected method

protected getPropertyValue ( object $object, string $property ) : mixed
$object object
$property string
return mixed
    protected function getPropertyValue($object, $property)
    {
        $reflection = new \ReflectionProperty($object, $property);
        $reflection->setAccessible(true);
        return $reflection->getValue($object);
    }