You are here

public function ProxyLogicTest::testCallingMethodCausesLazyLoading in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php \Doctrine\Tests\Common\Proxy\ProxyLogicTest::testCallingMethodCausesLazyLoading()

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php, line 130

Class

ProxyLogicTest
Test the generated proxies behavior. These tests make assumptions about the structure of LazyLoadableObject

Namespace

Doctrine\Tests\Common\Proxy

Code

public function testCallingMethodCausesLazyLoading() {
  $this
    ->configureInitializerMock(1, array(
    $this->lazyObject,
    'testInitializationTriggeringMethod',
    array(),
  ), function (Proxy $proxy) {
    $proxy
      ->__setInitializer(null);
  });
  $this->lazyObject
    ->testInitializationTriggeringMethod();
  $this->lazyObject
    ->testInitializationTriggeringMethod();
}