public function ProxyLogicTest::testFetchingTransientPropertiesWillNotTriggerLazyLoading in Plug 7
File
- lib/
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');
}