Neos\Flow\Tests\Unit\Reflection\PropertyReflectionTest::getValueReturnsValueOfAPrivatePropertyEvenIfItIsAnObject PHP Method

getValueReturnsValueOfAPrivatePropertyEvenIfItIsAnObject() public method

    public function getValueReturnsValueOfAPrivatePropertyEvenIfItIsAnObject()
    {
        $reflectionProperty = new Reflection\PropertyReflection(__CLASS__, 'privateProperty');
        $this->protectedProperty = new \ArrayObject(['1', '2', '3']);
        $this->assertEquals($this->privateProperty, $reflectionProperty->getValue($this), 'ReflectionProperty->getValue($this) did not return the object of our private property.');
        $this->privateProperty = $this;
        $this->assertSame($this, $reflectionProperty->getValue($this), 'ReflectionProperty->getValue($this) did not return the reference to $this.');
    }