mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
tests(oci): Test where statement on longtext column
Signed-off-by: Julius Härtl <jus@bitgrid.net> test: try with just passing the type to eq which should also cast Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
4ee9deea00
commit
9df31d7195
1 changed files with 18 additions and 0 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue