From 22e12e00439ac0f422e96a4e16648d6abe9e89dd Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 12 Jan 2015 23:50:16 +0100 Subject: [PATCH] #1001 DDC-3005 - coverage annotations, minor CS fixes --- lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php | 1 + lib/Doctrine/ORM/Cache/DefaultQueryCache.php | 2 ++ tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php b/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php index b040dfa92..1190b38fd 100644 --- a/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php +++ b/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php @@ -152,6 +152,7 @@ class DefaultEntityHydrator implements EntityHydrator } $result = $this->uow->createEntity($entry->class, $data, $hints); + $this->uow->hydrationComplete(); return $result; diff --git a/lib/Doctrine/ORM/Cache/DefaultQueryCache.php b/lib/Doctrine/ORM/Cache/DefaultQueryCache.php index 6d0c35492..87bb13663 100644 --- a/lib/Doctrine/ORM/Cache/DefaultQueryCache.php +++ b/lib/Doctrine/ORM/Cache/DefaultQueryCache.php @@ -148,6 +148,7 @@ class DefaultQueryCache implements QueryCache if ($this->cacheLogger !== null) { $this->cacheLogger->entityCacheMiss($assocRegion->getName(), $assocKey); } + $this->uow->hydrationComplete(); return null; @@ -176,6 +177,7 @@ class DefaultQueryCache implements QueryCache if ($this->cacheLogger !== null) { $this->cacheLogger->entityCacheMiss($assocRegion->getName(), $assocKey); } + $this->uow->hydrationComplete(); return null; diff --git a/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php b/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php index 30bd8edc2..9dcff9cb6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php @@ -204,6 +204,9 @@ class PostLoadEventTest extends \Doctrine\Tests\OrmFunctionalTestCase $phonenumbersCol->first(); } + /** + * @group DDC-3005 + */ public function testAssociationsArePopulatedWhenEventIsFired() { $checkerListener = new PostLoadListenerCheckAssociationsArePopulated(); @@ -218,6 +221,9 @@ class PostLoadEventTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertTrue($checkerListener->populated, 'Association of email is not populated in postLoad event'); } + /** + * @group DDC-3005 + */ public function testEventRaisedCorrectTimesWhenOtherEntityLoadedInEventHandler() { $eventManager = $this->_em->getEventManager();