summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-06-14 14:32:22 +0200
committerRobin Appelman <robin@icewind.nl>2018-06-14 14:32:22 +0200
commit3047ef31bd8b667cd6d95e133f5968a6822ff279 (patch)
treed07fbfcaca98477f0b6f68a7d95f5f2e0448dc2e /tests
parentcd87a40eb3a2b7026dfd1822e6e43e131edd3423 (diff)
downloadnextcloud-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.php10
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());
+ }
}