From 3e601c3a53226ce981fe82db164f297a8d605ae7 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Wed, 23 May 2012 00:10:25 -0400 Subject: [PATCH] Added coverage for DDC-369 and DDC-954. All passing. --- .../Tests/ORM/Functional/AdvancedDqlQueryTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php b/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php index e7bb83108..a5c06e3bd 100644 --- a/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php @@ -128,14 +128,16 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase 'SELECT count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1')->getResult()) > 0); } - /*public function testDeleteAs() + public function testDeleteAs() { $dql = 'DELETE Doctrine\Tests\Models\Company\CompanyEmployee AS p'; $this->_em->createQuery($dql)->getResult(); - $this->assertEquals(0, count($this->_em->createQuery( - 'SELECT count(p) FROM Doctrine\Tests\Models\Company\CompanyEmployee p')->getResult())); - }*/ + $dql = 'SELECT count(p) FROM Doctrine\Tests\Models\Company\CompanyEmployee p'; + $result = $this->_em->createQuery($dql)->getSingleScalarResult(); + + $this->assertEquals(0, $result); + } public function generateFixture() {