public function ProxyLogicTest::testFetchingPublicAssociationCausesLazyLoading in Plug 7
File
- lib/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Proxy/ ProxyLogicTest.php, line 159
Class
- ProxyLogicTest
- Test the generated proxies behavior. These tests make assumptions about the structure of LazyLoadableObject
Namespace
Doctrine\Tests\Common\ProxyCode
public function testFetchingPublicAssociationCausesLazyLoading() {
$test = $this;
$this
->configureInitializerMock(1, array(
$this->lazyObject,
'__get',
array(
'publicAssociation',
),
), function () use ($test) {
$test
->setProxyValue('publicAssociation', 'loadedAssociation');
});
$this
->assertSame('loadedAssociation', $this->lazyObject->publicAssociation);
$this
->assertSame('loadedAssociation', $this->lazyObject->publicAssociation);
}