You are here

public function AbstractProxyFactoryTest::testDisallowsResettingInitializedProxy in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AbstractProxyFactoryTest.php \Doctrine\Tests\Common\Proxy\AbstractProxyFactoryTest::testDisallowsResettingInitializedProxy()

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AbstractProxyFactoryTest.php, line 103

Class

AbstractProxyFactoryTest

Namespace

Doctrine\Tests\Common\Proxy

Code

public function testDisallowsResettingInitializedProxy() {
  $proxyFactory = $this
    ->getMockForAbstractClass('Doctrine\\Common\\Proxy\\AbstractProxyFactory', array(), '', false);
  $proxy = $this
    ->getMock('Doctrine\\Common\\Proxy\\Proxy');
  $proxy
    ->expects($this
    ->any())
    ->method('__isInitialized')
    ->will($this
    ->returnValue(true));
  $this
    ->setExpectedException('Doctrine\\Common\\Proxy\\Exception\\InvalidArgumentException');
  $proxyFactory
    ->resetUninitializedProxy($proxy);
}