From 647c5e2cad135abb9158a538b4e3f7758f8b71ed Mon Sep 17 00:00:00 2001 From: Sander Marechal Date: Thu, 20 Jun 2013 10:18:08 +0200 Subject: [PATCH] Test actual data returned by get() --- .../Tests/ORM/Functional/ExtraLazyCollectionTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php index fe642ac1b..b1a2f7fd4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php @@ -527,10 +527,11 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase $queryCount = $this->getCurrentQueryCount(); - $user->articles->get($this->articleId); + $article = $user->articles->get($this->articleId); $this->assertFalse($user->articles->isInitialized()); $this->assertEquals($queryCount + 1, $this->getCurrentQueryCount()); + $this->assertSame($article, $this->_em->find('Doctrine\Tests\Models\CMS\CmsArticle', $this->articleId)); } /** @@ -543,10 +544,11 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase $queryCount = $this->getCurrentQueryCount(); - $user->groups->get($this->groupId); + $group = $user->groups->get($this->groupId); $this->assertFalse($user->groups->isInitialized()); $this->assertEquals($queryCount + 1, $this->getCurrentQueryCount()); + $this->assertSame($group, $this->_em->find('Doctrine\Tests\Models\CMS\CmsGroup', $this->groupId)); } /**