]> source.dussan.org Git - nextcloud-server.git/commitdiff
Avoid select with no FROM clause for Oracle in tests
authorCôme Chilliet <come.chilliet@nextcloud.com>
Thu, 24 Mar 2022 16:02:27 +0000 (17:02 +0100)
committerVincent Petry (Rebase PR Action) <PVince81@users.noreply.github.com>
Thu, 24 Mar 2022 20:35:02 +0000 (20:35 +0000)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
tests/lib/DB/QueryBuilder/FunctionBuilderTest.php

index 6b13051c2c143f4eed31b2696027b2d03a0f8758..08392b09d8dd2aadeec95340022bfa91bfc963a3 100644 (file)
@@ -352,6 +352,8 @@ class FunctionBuilderTest extends TestCase {
                $query = $this->connection->getQueryBuilder();
 
                $query->select($query->func()->octetLength($query->createNamedParameter($str, IQueryBuilder::PARAM_STR)));
+               $query->from('appconfig')
+                       ->setMaxResults(1);
 
                $result = $query->execute();
                $column = $result->fetchOne();
@@ -375,6 +377,8 @@ class FunctionBuilderTest extends TestCase {
                $query = $this->connection->getQueryBuilder();
 
                $query->select($query->func()->charLength($query->createNamedParameter($str, IQueryBuilder::PARAM_STR)));
+               $query->from('appconfig')
+                       ->setMaxResults(1);
 
                $result = $query->execute();
                $column = $result->fetchOne();