Skip to content

Commit 0d8c914

Browse files
committed
test: fix for OCI8
1 parent 5c6f468 commit 0d8c914

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

tests/system/Database/Live/LikeTest.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ public function testLikeSpacesOrTabs()
129129
public function testLikeRawSqlAndCountAllResultsAndGet()
130130
{
131131
$builder = $this->db->table('job');
132-
$builder->like(new RawSql('name'), 'Developer');
132+
133+
if ($this->db->DBDriver === 'OCI8') {
134+
$key = new RawSql('"name"');
135+
} else {
136+
$key = new RawSql('name');
137+
}
138+
139+
$builder->like($key, 'Developer');
133140
$count = $builder->countAllResults(false);
134141
$results = $builder->get()->getResult();
135142

@@ -143,7 +150,14 @@ public function testLikeRawSqlAndCountAllResultsAndGet()
143150
public function testLikeRawSqlAndGetAndCountAllResults()
144151
{
145152
$builder = $this->db->table('job');
146-
$builder->like(new RawSql('name'), 'Developer');
153+
154+
if ($this->db->DBDriver === 'OCI8') {
155+
$key = new RawSql('"name"');
156+
} else {
157+
$key = new RawSql('name');
158+
}
159+
160+
$builder->like($key, 'Developer');
147161
$results = $builder->get(null, 0, false)->getResult();
148162
$count = $builder->countAllResults();
149163

0 commit comments

Comments
 (0)