Browse Source

`yiiunit\framework\db\QueryTest::testCount()` fixed to be more generic

tags/2.0.4
Klimov Paul 10 years ago
parent
commit
a8f4e8bee4
  1. 2
      tests/unit/framework/db/QueryTest.php

2
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);
}

Loading…
Cancel
Save