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:
Julius Härtl 2023-01-29 09:40:17 +01:00 committed by blizzz (Rebase PR Action)
parent 4ee9deea00
commit 9df31d7195

View file

@ -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')