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

getValueReturnsValueOfAProtectedPropertyEvenIfItIsAnObject() public method

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