diff options
author | Robin Appelman <robin@icewind.nl> | 2018-06-14 14:32:22 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-06-14 14:32:22 +0200 |
commit | 3047ef31bd8b667cd6d95e133f5968a6822ff279 (patch) | |
tree | d07fbfcaca98477f0b6f68a7d95f5f2e0448dc2e /tests | |
parent | cd87a40eb3a2b7026dfd1822e6e43e131edd3423 (diff) | |
download | nextcloud-server-3047ef31bd8b667cd6d95e133f5968a6822ff279.tar.gz nextcloud-server-3047ef31bd8b667cd6d95e133f5968a6822ff279.zip |
Add count to function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/DB/QueryBuilder/FunctionBuilderTest.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php index 1b998287c98..136650741f5 100644 --- a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php @@ -110,4 +110,14 @@ class FunctionBuilderTest extends TestCase { $this->assertEquals(1, $query->execute()->fetchColumn()); } + + public function testCount() { + $query = $this->connection->getQueryBuilder(); + + $query->select($query->func()->count('appid')); + $query->from('appconfig') + ->setMaxResults(1); + + $this->assertGreaterThan(1, $query->execute()->fetchColumn()); + } } |