You are here

public function ProxyLogicTest::testFailedLoadingWillThrowException in Plug 7

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php, line 311

Class

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

Namespace

Doctrine\Tests\Common\Proxy

Code

public function testFailedLoadingWillThrowException() {
  $this->proxyLoader
    ->expects($this
    ->any())
    ->method('load')
    ->will($this
    ->returnValue(null));
  $this
    ->setExpectedException('UnexpectedValueException');
  $this->lazyObject
    ->__setInitializer($this
    ->getSuggestedInitializerImplementation());
  $this->lazyObject
    ->__load();
}