public function testSkipsDeferredPostLoadOfMetadataWithNoInvokedListeners()
 {
     /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
     $metadata = $this->getMock('Doctrine\\ORM\\Mapping\\ClassMetadata', array(), array(), '', false);
     $entity = new stdClass();
     $this->listenersInvoker->expects($this->any())->method('getSubscribedSystems')->with($metadata)->will($this->returnValue(ListenersInvoker::INVOKE_NONE));
     $this->handler->deferPostLoadInvoking($metadata, $entity);
     $this->listenersInvoker->expects($this->never())->method('invoke');
     $this->handler->hydrationComplete();
 }
Example #2
0
 /**
  * This method called by hydrators, and indicates that hydrator totally completed current hydration cycle.
  * Unit of work able to fire deferred events, related to loading events here.
  *
  * @internal should be called internally from object hydrators
  */
 public function hydrationComplete()
 {
     $this->hydrationCompleteHandler->hydrationComplete();
 }