From 3047ef31bd8b667cd6d95e133f5968a6822ff279 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 Jun 2018 14:32:22 +0200 Subject: Add count to function builder Signed-off-by: Robin Appelman --- tests/lib/DB/QueryBuilder/FunctionBuilderTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') 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()); + } } -- cgit v1.2.3