public function ProxyLogicTest::testFetchingTransientPropertiesWillNotTriggerLazyLoading in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php \Doctrine\Tests\Common\Proxy\ProxyLogicTest::testFetchingTransientPropertiesWillNotTriggerLazyLoading()
File
- vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Proxy/ ProxyLogicTest.php, line 254
Class
- ProxyLogicTest
- Test the generated proxies behavior. These tests make assumptions about the structure of LazyLoadableObject
Namespace
Doctrine\Tests\Common\ProxyCode
public function testFetchingTransientPropertiesWillNotTriggerLazyLoading() {
$this
->configureInitializerMock(0);
$this
->assertSame('publicTransientFieldValue', $this->lazyObject->publicTransientField, 'fetching public transient field won\'t trigger lazy loading');
$property = $this->lazyLoadableObjectMetadata
->getReflectionClass()
->getProperty('protectedTransientField');
$property
->setAccessible(true);
$this
->assertSame('protectedTransientFieldValue', $property
->getValue($this->lazyObject), 'fetching protected transient field via reflection won\'t trigger lazy loading');
}