public function ProxyLogicTest::testInitializationRestoresDefaultPublicLazyLoadedFieldValues 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::testInitializationRestoresDefaultPublicLazyLoadedFieldValues()
File
- vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Proxy/ ProxyLogicTest.php, line 506
Class
- ProxyLogicTest
- Test the generated proxies behavior. These tests make assumptions about the structure of LazyLoadableObject
Namespace
Doctrine\Tests\Common\ProxyCode
public function testInitializationRestoresDefaultPublicLazyLoadedFieldValues() {
// setting noop persister
$this->proxyLoader
->expects($this
->once())
->method('load')
->will($this
->returnValue($this->lazyObject));
$this->lazyObject
->__setInitializer($this
->getSuggestedInitializerImplementation());
$this
->assertSame('publicPersistentFieldValue', $this->lazyObject->publicPersistentField, 'Persistent field is restored to default value');
$this
->assertSame('publicAssociationValue', $this->lazyObject->publicAssociation, 'Association is restored to default value');
}