From a8f4e8bee41a0827f8f7c720531ebf77b1cb8b31 Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Tue, 14 Apr 2015 16:58:46 +0300 Subject: [PATCH] `yiiunit\framework\db\QueryTest::testCount()` fixed to be more generic --- tests/unit/framework/db/QueryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/framework/db/QueryTest.php b/tests/unit/framework/db/QueryTest.php index 6000620..9af0781 100644 --- a/tests/unit/framework/db/QueryTest.php +++ b/tests/unit/framework/db/QueryTest.php @@ -216,7 +216,7 @@ class QueryTest extends DatabaseTestCase $count = (new Query)->from('customer')->where(['status' => 2])->count('*', $db); $this->assertEquals(1, $count); - $count = (new Query)->from('customer')->groupBy('status')->count('*', $db); + $count = (new Query)->select('status, COUNT(id)')->from('customer')->groupBy('status')->count('*', $db); $this->assertEquals(2, $count); }