Skip to content

Commit 4342950

Browse files
authored
Adapt test for changes in db (#364)
1 parent b84963a commit 4342950

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/Provider/QueryBuilderProvider.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,22 @@ public static function upsert(): array
251251
return $upsert;
252252
}
253253

254+
public static function selectScalar(): array
255+
{
256+
$data = parent::selectScalar();
257+
258+
$data['true'][1] = "SELECT '1'";
259+
$data['false'][1] = "SELECT '0'";
260+
$data['array'][1] = "SELECT 1, '1', 12.34";
261+
$data['string keys'][1] = 'SELECT 1 AS "a", \'1\' AS "b", 12.34';
262+
263+
foreach ($data as &$values) {
264+
$values[1] .= ' FROM DUAL';
265+
}
266+
267+
return $data;
268+
}
269+
254270
public static function buildColumnDefinition(): array
255271
{
256272
$referenceRestrict = new ForeignKey(
@@ -452,7 +468,7 @@ public static function caseExpressionBuilder(): array
452468
3,
453469
];
454470
$data['without case expression'][1] = 'CASE WHEN "column_name" = 1 THEN :qp0'
455-
. ' WHEN "column_name" = 2 THEN (SELECT :pv1 FROM DUAL) END';
471+
. ' WHEN "column_name" = 2 THEN (SELECT :qp1 FROM DUAL) END';
456472

457473
return $data;
458474
}

0 commit comments

Comments
 (0)