summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-19 14:12:22 +0200
committerGitHub <noreply@github.com>2018-06-19 14:12:22 +0200
commit8646f01320f685de1a428b6e696c7ea691defffc (patch)
tree0d1e951f9102b9d32c5a9bdd571d7a4da604e471 /tests
parent1d65e44dae971d85c785d74ed7f9b4a574d54121 (diff)
parent4187d2cdb391bbe7518c602a579abd1305787bf2 (diff)
downloadnextcloud-server-8646f01320f685de1a428b6e696c7ea691defffc.tar.gz
nextcloud-server-8646f01320f685de1a428b6e696c7ea691defffc.zip
Merge pull request #9881 from nextcloud/user-db-backend-querybuilder
use query builder in all places in the db user backend
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());
+ }
}