Redaxscript\Tests\TestCaseAbstract::getProperty PHP Method

getProperty() public method

getProperty
Since: 3.0.0
public getProperty ( object $object = null, string $property = null ) : mixed
$object object
$property string
return mixed
    public function getProperty($object = null, $property = null)
    {
        $reflectionObject = new ReflectionClass($object);
        $reflectionProperty = $reflectionObject->getProperty($property);
        $reflectionProperty->setAccessible(true);
        return $reflectionProperty->getValue($object);
    }