diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index 3cf0fae1e..84b0203f0 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -303,14 +303,13 @@ abstract class AbstractQuery /** * Gets the list of results for the query. * - * Alias for execute(array(), HYDRATE_OBJECT). + * Alias for execute(array(), $hydrationMode = HYDRATE_OBJECT). * * @return array - * @todo getResult() */ - public function getResultList() + public function getResult($hydrationMode = self::HYDRATE_OBJECT) { - return $this->execute(array(), self::HYDRATE_OBJECT); + return $this->execute(array(), $hydrationMode); } /** @@ -319,9 +318,8 @@ abstract class AbstractQuery * Alias for execute(array(), HYDRATE_ARRAY). * * @return array - * @todo getArrayResult() */ - public function getResultArray() + public function getArrayResult() { return $this->execute(array(), self::HYDRATE_ARRAY); } diff --git a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php index 0277c69e0..26f59e62e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php @@ -223,7 +223,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select u from Doctrine\Tests\Models\CMS\CmsUser u"); - $users = $query->getResultList(); + $users = $query->getResult(); $this->assertEquals(1, count($users)); $this->assertEquals('Guilherme', $users[0]->name); @@ -232,7 +232,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase //$this->assertNull($users[0]->phonenumbers); //$this->assertNull($users[0]->articles); - $usersArray = $query->getResultArray(); + $usersArray = $query->getArrayResult(); $this->assertTrue(is_array($usersArray)); $this->assertEquals(1, count($usersArray)); @@ -260,7 +260,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select u from Doctrine\Tests\Models\CMS\CmsUser u join u.phonenumbers p"); - $users = $query->getResultList(); + $users = $query->getResult(); $this->assertEquals(0, count($users)); } @@ -276,7 +276,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select u,p from Doctrine\Tests\Models\CMS\CmsUser u left join u.phonenumbers p"); - $users = $query->getResultList(); + $users = $query->getResult(); $this->assertEquals(1, count($users)); $this->assertEquals('Guilherme', $users[0]->name); @@ -308,7 +308,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select u, g from Doctrine\Tests\Models\CMS\CmsUser u join u.groups g"); - $result = $query->getResultList(); + $result = $query->getResult(); $this->assertEquals(2, $this->_em->getUnitOfWork()->size()); $this->assertTrue($result[0] instanceof CmsUser); @@ -330,7 +330,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->clear(); $query = $this->_em->createQuery("select u, g from Doctrine\Tests\Models\CMS\CmsUser u inner join u.groups g"); - $this->assertEquals(0, count($query->getResultList())); + $this->assertEquals(0, count($query->getResult())); } public function testBasicRefresh() diff --git a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php index 3d01110c5..ebcb91dd3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php @@ -41,7 +41,7 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select p from Doctrine\Tests\Models\Company\CompanyPerson p order by p.id asc"); - $entities = $query->getResultList(); + $entities = $query->getResult(); $this->assertEquals(2, count($entities)); $this->assertTrue($entities[0] instanceof CompanyPerson); @@ -56,7 +56,7 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select p from Doctrine\Tests\Models\Company\CompanyEmployee p"); - $entities = $query->getResultList(); + $entities = $query->getResult(); $this->assertEquals(1, count($entities)); $this->assertTrue($entities[0] instanceof CompanyEmployee); @@ -132,7 +132,7 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery('select p, s from Doctrine\Tests\Models\Company\CompanyPerson p join p.spouse s where p.name=\'Mary Smith\''); - $result = $query->getResultList(); + $result = $query->getResult(); $this->assertEquals(1, count($result)); $this->assertTrue($result[0] instanceof CompanyPerson); $this->assertEquals('Mary Smith', $result[0]->getName()); @@ -165,7 +165,7 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery('select p, f from Doctrine\Tests\Models\Company\CompanyPerson p join p.friends f where p.name=?1'); $query->setParameter(1, 'Roman'); - $result = $query->getResultList(); + $result = $query->getResult(); $this->assertEquals(1, count($result)); $this->assertEquals(1, count($result[0]->getFriends())); $this->assertEquals('Roman', $result[0]->getName()); diff --git a/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php b/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php index 95eaf6e15..e0631b133 100644 --- a/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php @@ -30,7 +30,7 @@ class LifecycleCallbackTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->clear(); $query = $this->_em->createQuery("select e from Doctrine\Tests\ORM\Functional\LifecycleCallbackTestEntity e"); - $result = $query->getResultList(); + $result = $query->getResult(); $this->assertTrue($result[0]->postLoadCallbackInvoked); $result[0]->value = 'hello again'; diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php index 0b9833c21..775f1c3ab 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php @@ -89,7 +89,7 @@ class ManyToManyBidirectionalAssociationTest extends AbstractManyToManyAssociati $metadata->getAssociationMapping('products')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('SELECT c FROM Doctrine\Tests\Models\ECommerce\ECommerceCategory c order by c.id'); - $categories = $query->getResultList(); + $categories = $query->getResult(); $this->assertLoadingOfInverseSide($categories); } @@ -102,7 +102,7 @@ class ManyToManyBidirectionalAssociationTest extends AbstractManyToManyAssociati $metadata->getAssociationMapping('categories')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('SELECT p FROM Doctrine\Tests\Models\ECommerce\ECommerceProduct p order by p.id'); - $products = $query->getResultList(); + $products = $query->getResult(); $this->assertEquals(2, count($products)); $this->assertEquals(0, count($products[0]->getCategories()->unwrap())); @@ -128,7 +128,7 @@ class ManyToManyBidirectionalAssociationTest extends AbstractManyToManyAssociati protected function _findProducts() { $query = $this->_em->createQuery('SELECT p, c FROM Doctrine\Tests\Models\ECommerce\ECommerceProduct p LEFT JOIN p.categories c ORDER BY p.id, c.id'); - return $query->getResultList(); + return $query->getResult(); } public function assertLoadingOfOwningSide($products) diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php index 7286bfcf3..6e43b2122 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php @@ -78,7 +78,7 @@ class ManyToManySelfReferentialAssociationTest extends AbstractManyToManyAssocia $metadata->getAssociationMapping('related')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('SELECT p FROM Doctrine\Tests\Models\ECommerce\ECommerceProduct p'); - $products = $query->getResultList(); + $products = $query->getResult(); $this->assertLoadingOfOwningSide($products); } @@ -119,6 +119,6 @@ class ManyToManySelfReferentialAssociationTest extends AbstractManyToManyAssocia protected function _findProducts() { $query = $this->_em->createQuery('SELECT p, r FROM Doctrine\Tests\Models\ECommerce\ECommerceProduct p LEFT JOIN p.related r ORDER BY p.id, r.id'); - return $query->getResultList(); + return $query->getResult(); } } diff --git a/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php index 148362162..a74aee5ca 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ManyToManyUnidirectionalAssociationTest.php @@ -63,7 +63,7 @@ class ManyToManyUnidirectionalAssociationTest extends AbstractManyToManyAssociat $this->_createFixture(); $query = $this->_em->createQuery('SELECT c, p FROM Doctrine\Tests\Models\ECommerce\ECommerceCart c LEFT JOIN c.products p ORDER BY c.id, p.id'); - $result = $query->getResultList(); + $result = $query->getResult(); $firstCart = $result[0]; $products = $firstCart->getProducts(); $secondCart = $result[1]; @@ -83,7 +83,7 @@ class ManyToManyUnidirectionalAssociationTest extends AbstractManyToManyAssociat $metadata->getAssociationMapping('products')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('SELECT c FROM Doctrine\Tests\Models\ECommerce\ECommerceCart c'); - $result = $query->getResultList(); + $result = $query->getResult(); $firstCart = $result[0]; $products = $firstCart->getProducts(); $secondCart = $result[1]; diff --git a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php index 63b5da564..182a4de92 100644 --- a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php @@ -36,7 +36,7 @@ class NativeQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createNativeQuery('SELECT id, name FROM cms_users WHERE username = ?', $rsm); $query->setParameter(1, 'romanb'); - $users = $query->getResultList(); + $users = $query->getResult(); $this->assertEquals(1, count($users)); $this->assertTrue($users[0] instanceof CmsUser); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php index 7d0e33053..deea538c9 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php @@ -72,7 +72,7 @@ class OneToManyBidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona { $this->_createFixture(); $query = $this->_em->createQuery('select p, f from Doctrine\Tests\Models\ECommerce\ECommerceProduct p join p.features f'); - $result = $query->getResultList(); + $result = $query->getResult(); $product = $result[0]; $features = $product->getFeatures(); @@ -92,7 +92,7 @@ class OneToManyBidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona $metadata->getAssociationMapping('features')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('select p from Doctrine\Tests\Models\ECommerce\ECommerceProduct p'); - $result = $query->getResultList(); + $result = $query->getResult(); $product = $result[0]; $features = $product->getFeatures(); @@ -112,7 +112,7 @@ class OneToManyBidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona $metadata->getAssociationMapping('product')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('select f from Doctrine\Tests\Models\ECommerce\ECommerceFeature f'); - $features = $query->getResultList(); + $features = $query->getResult(); $product = $features[0]->getProduct(); $this->assertTrue($product instanceof ECommerceProduct); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php index 0b245e320..a9ba642ac 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToManySelfReferentialAssociationTest.php @@ -73,7 +73,7 @@ class OneToManySelfReferentialAssociationTest extends \Doctrine\Tests\OrmFunctio $this->_createFixture(); $query = $this->_em->createQuery('select c1, c2 from Doctrine\Tests\Models\ECommerce\ECommerceCategory c1 join c1.children c2'); - $result = $query->getResultList(); + $result = $query->getResult(); $this->assertEquals(1, count($result)); $parent = $result[0]; $children = $parent->getChildren(); @@ -94,7 +94,7 @@ class OneToManySelfReferentialAssociationTest extends \Doctrine\Tests\OrmFunctio $metadata->getAssociationMapping('children')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('select c from Doctrine\Tests\Models\ECommerce\ECommerceCategory c order by c.id asc'); - $result = $query->getResultList(); + $result = $query->getResult(); $parent = $result[0]; $children = $parent->getChildren(); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php index 7d4aa6111..4d3338cf6 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneBidirectionalAssociationTest.php @@ -58,7 +58,7 @@ class OneToOneBidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctional $this->_createFixture(); $query = $this->_em->createQuery('select c, ca from Doctrine\Tests\Models\ECommerce\ECommerceCustomer c join c.cart ca'); - $result = $query->getResultList(); + $result = $query->getResult(); $customer = $result[0]; $this->assertTrue($customer->getCart() instanceof ECommerceCart); @@ -72,7 +72,7 @@ class OneToOneBidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctional $metadata->getAssociationMapping('customer')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('select c from Doctrine\Tests\Models\ECommerce\ECommerceCart c'); - $result = $query->getResultList(); + $result = $query->getResult(); $cart = $result[0]; $this->assertTrue($cart->getCustomer() instanceof ECommerceCustomer); @@ -86,7 +86,7 @@ class OneToOneBidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctional $metadata->getAssociationMapping('mentor')->fetchMode = AssociationMapping::FETCH_EAGER; $query = $this->_em->createQuery('select c from Doctrine\Tests\Models\ECommerce\ECommerceCustomer c'); - $result = $query->getResultList(); + $result = $query->getResult(); $customer = $result[0]; $this->assertNull($customer->getMentor()); diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php index 4bdf54125..16e49d009 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php @@ -53,7 +53,7 @@ class OneToOneSelfReferentialAssociationTest extends \Doctrine\Tests\OrmFunction $this->_createFixture(); $query = $this->_em->createQuery('select c, m from Doctrine\Tests\Models\ECommerce\ECommerceCustomer c left join c.mentor m order by c.id asc'); - $result = $query->getResultList(); + $result = $query->getResult(); $customer = $result[0]; $this->assertLoadingOfAssociation($customer); } @@ -67,7 +67,7 @@ class OneToOneSelfReferentialAssociationTest extends \Doctrine\Tests\OrmFunction $metadata->getAssociationMapping('mentor')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('select c from Doctrine\Tests\Models\ECommerce\ECommerceCustomer c'); - $result = $query->getResultList(); + $result = $query->getResult(); $customer = $result[0]; $this->assertLoadingOfAssociation($customer); } diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php index 2fc57bfd9..bac488b36 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToOneUnidirectionalAssociationTest.php @@ -51,7 +51,7 @@ class OneToOneUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona $this->_createFixture(); $query = $this->_em->createQuery('select p, s from Doctrine\Tests\Models\ECommerce\ECommerceProduct p left join p.shipping s'); - $result = $query->getResultList(); + $result = $query->getResult(); $product = $result[0]; $this->assertTrue($product->getShipping() instanceof ECommerceShipping); @@ -65,7 +65,7 @@ class OneToOneUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona $metadata->getAssociationMapping('shipping')->fetchMode = AssociationMapping::FETCH_LAZY; $query = $this->_em->createQuery('select p from Doctrine\Tests\Models\ECommerce\ECommerceProduct p'); - $result = $query->getResultList(); + $result = $query->getResult(); $product = $result[0]; $this->assertTrue($product->getShipping() instanceof ECommerceShipping); @@ -77,7 +77,7 @@ class OneToOneUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona $this->_em->getConfiguration()->setAllowPartialObjects(true); $query = $this->_em->createQuery('select p from Doctrine\Tests\Models\ECommerce\ECommerceProduct p'); - $result = $query->getResultList(); + $result = $query->getResult(); $product = $result[0]; $this->assertNull($product->getShipping()); diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php index 4b0c9aa7c..369d50b83 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php @@ -36,7 +36,7 @@ class QueryCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase $query->setQueryCacheDriver($cache); $this->assertEquals(0, $cache->count()); - $users = $query->getResultList(); + $users = $query->getResult(); $this->assertEquals(1, $cache->count()); $this->assertTrue($cache->contains(md5('select ux from Doctrine\Tests\Models\CMS\CmsUser uxDOCTRINE_QUERY_CACHE_SALT'))); @@ -48,7 +48,7 @@ class QueryCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase $query2 = $this->_em->createQuery('select ux from Doctrine\Tests\Models\CMS\CmsUser ux'); $query2->setQueryCacheDriver($cache); - $users = $query2->getResultList(); + $users = $query2->getResult(); $this->assertEquals(1, $cache->count()); $this->assertTrue($cache->contains(md5('select ux from Doctrine\Tests\Models\CMS\CmsUser uxDOCTRINE_QUERY_CACHE_SALT'))); diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php index 10ab9fdee..7c7216ab5 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php @@ -32,7 +32,7 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select u, upper(u.name) from Doctrine\Tests\Models\CMS\CmsUser u where u.username = 'gblanco'"); - $result = $query->getResultList(); + $result = $query->getResult(); $this->assertEquals(1, count($result)); $this->assertTrue($result[0][0] instanceof CmsUser); @@ -41,7 +41,7 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertEquals('developer', $result[0][0]->status); $this->assertEquals('GUILHERME', $result[0][1]); - $resultArray = $query->getResultArray(); + $resultArray = $query->getArrayResult(); $this->assertEquals(1, count($resultArray)); $this->assertTrue(is_array($resultArray[0][0])); $this->assertEquals('Guilherme', $resultArray[0][0]['name']); @@ -85,7 +85,7 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->clear(); $query = $this->_em->createQuery("select u, a from Doctrine\Tests\Models\CMS\CmsUser u join u.articles a"); - $users = $query->getResultList(); + $users = $query->getResult(); $this->assertEquals(1, count($users)); $this->assertTrue($users[0] instanceof CmsUser); $this->assertEquals(2, count($users[0]->articles)); diff --git a/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php index 9123a7bd0..00d34f4ab 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php @@ -36,7 +36,7 @@ class ResultCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase $initialQueryCount = $this->_em->getConnection()->getQueryCount(); - $users = $query->getResultList(); + $users = $query->getResult(); $this->assertEquals($initialQueryCount + 1, $this->_em->getConnection()->getQueryCount()); $this->assertEquals(1, $cache->count()); @@ -48,7 +48,7 @@ class ResultCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase $query2 = $this->_em->createQuery('select ux from Doctrine\Tests\Models\CMS\CmsUser ux'); $query2->setResultCache($cache); - $users = $query2->getResultList(); + $users = $query2->getResult(); $this->assertEquals($initialQueryCount + 1, $this->_em->getConnection()->getQueryCount()); $this->assertEquals(1, $cache->count()); diff --git a/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php b/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php index 9e8f07a28..89495e845 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php @@ -48,7 +48,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select e from Doctrine\Tests\ORM\Functional\ParentEntity e order by e.data asc"); - $entities = $query->getResultList(); + $entities = $query->getResult(); $this->assertEquals(2, count($entities)); $this->assertTrue(is_numeric($entities[0]->getId())); @@ -63,7 +63,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select e from Doctrine\Tests\ORM\Functional\ChildEntity e"); - $entities = $query->getResultList(); + $entities = $query->getResult(); $this->assertEquals(1, count($entities)); $this->assertTrue($entities[0] instanceof ChildEntity); $this->assertTrue(is_numeric($entities[0]->getId())); @@ -74,7 +74,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $query = $this->_em->createQuery("select r,o from Doctrine\Tests\ORM\Functional\RelatedEntity r join r.owner o"); - $entities = $query->getResultList(); + $entities = $query->getResult(); $this->assertEquals(1, count($entities)); $this->assertTrue($entities[0] instanceof RelatedEntity); $this->assertTrue(is_numeric($entities[0]->getId()));