summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-01-31 15:27:19 +0100
committerGitHub <noreply@github.com>2023-01-31 15:27:19 +0100
commitca3f53ab88b06c8ceea5d7991ff40641a9820728 (patch)
tree066d9bb63fa7a7003f6dcdeb6689e956870199a7 /tests
parent3ff568342b6c70dc90daa658e69f93049787e77c (diff)
parentecccff8bd232b579f08bc7fe387a5379cc6436cd (diff)
downloadnextcloud-server-ca3f53ab88b06c8ceea5d7991ff40641a9820728.tar.gz
nextcloud-server-ca3f53ab88b06c8ceea5d7991ff40641a9820728.zip
Merge pull request #36453 from nextcloud/bugfix/noid/oci-longtext
Fix MigrateBackgroundImages on oracle
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
index 4a168cb0143..35d8b4faa34 100644
--- a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
+++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
@@ -132,6 +132,24 @@ class ExpressionBuilderDBTest extends TestCase {
$this->assertEquals(1, $result);
}
+ public function testLongText(): void {
+ $appId = $this->getUniqueID('testing');
+ $this->createConfig($appId, 'mykey', 'myvalue');
+
+ $query = $this->connection->getQueryBuilder();
+ $query->select('*')
+ ->from('appconfig')
+ ->where($query->expr()->eq('appid', $query->createNamedParameter($appId)))
+ ->andWhere($query->expr()->eq('configkey', $query->createNamedParameter('mykey')))
+ ->andWhere($query->expr()->eq('configvalue', $query->createNamedParameter('myvalue', IQueryBuilder::PARAM_STR), IQueryBuilder::PARAM_STR));
+
+ $result = $query->executeQuery();
+ $entries = $result->fetchAll();
+ $result->closeCursor();
+ self::assertCount(1, $entries);
+ self::assertEquals('myvalue', $entries[0]['configvalue']);
+ }
+
protected function createConfig($appId, $key, $value) {
$query = $this->connection->getQueryBuilder();
$query->insert('appconfig')