From 8c407af1fce4b4391724018faed9e77b5996062f Mon Sep 17 00:00:00 2001 From: "Fabio B. Silva" Date: Tue, 28 Feb 2012 23:46:28 -0300 Subject: [PATCH] fix postgres test --- tests/Doctrine/Tests/Models/CMS/CmsUser.php | 4 ++-- tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Doctrine/Tests/Models/CMS/CmsUser.php b/tests/Doctrine/Tests/Models/CMS/CmsUser.php index bec1b143d..e414ee95e 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsUser.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsUser.php @@ -35,7 +35,7 @@ use Doctrine\Common\Collections\ArrayCollection; * @NamedNativeQuery( * name = "fetchUserPhonenumberCount", * resultSetMapping= "mappingUserPhonenumberCount", - * query = "SELECT id, name, status, COUNT(phonenumber) AS numPhones FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username IN (?) GROUP BY id, name, status ORDER BY username" + * query = "SELECT id, name, status, COUNT(phonenumber) AS numphones FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username IN (?) GROUP BY id, name, status, username ORDER BY username" * ), * }) * @@ -84,7 +84,7 @@ use Doctrine\Common\Collections\ArrayCollection; * ) * }, * columns = { - * @ColumnResult("numPhones") + * @ColumnResult("numphones") * } * ) * }) diff --git a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php index 12dbbc6d4..c9496c0ec 100644 --- a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php @@ -540,12 +540,12 @@ class NativeQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase // first user => 2 phonenumbers $this->assertInstanceOf('Doctrine\Tests\Models\CMS\CmsUser', $result[0][0]); $this->assertEquals('Fabio B. Silva', $result[0][0]->name); - $this->assertEquals(2, $result[0]['numPhones']); + $this->assertEquals(2, $result[0]['numphones']); // second user => 1 phonenumbers $this->assertInstanceOf('Doctrine\Tests\Models\CMS\CmsUser', $result[1][0]); $this->assertEquals('test tester', $result[1][0]->name); - $this->assertEquals(1, $result[1]['numPhones']); + $this->assertEquals(1, $result[1]['numphones']); } /**