public function RuntimePublicReflectionPropertyTest::testGetValueOnProxyPublicProperty in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/RuntimePublicReflectionPropertyTest.php \Doctrine\Tests\Common\Reflection\RuntimePublicReflectionPropertyTest::testGetValueOnProxyPublicProperty()
File
- vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Reflection/ RuntimePublicReflectionPropertyTest.php, line 11
Class
Namespace
Doctrine\Tests\Common\ReflectionCode
public function testGetValueOnProxyPublicProperty() {
$getCheckMock = $this
->getMock('stdClass', array(
'callGet',
));
$getCheckMock
->expects($this
->never())
->method('callGet');
$initializer = function () use ($getCheckMock) {
call_user_func($getCheckMock);
};
$mockProxy = new RuntimePublicReflectionPropertyTestProxyMock();
$mockProxy
->__setInitializer($initializer);
$reflProperty = new RuntimePublicReflectionProperty(__NAMESPACE__ . '\\RuntimePublicReflectionPropertyTestProxyMock', 'checkedProperty');
$this
->assertSame('testValue', $reflProperty
->getValue($mockProxy));
unset($mockProxy->checkedProperty);
$this
->assertNull($reflProperty
->getValue($mockProxy));
}