Skip to content

Commit f7e4239

Browse files
committed
Fix tests
1 parent 60ccc86 commit f7e4239

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Type/Doctrine/data/QueryResult/expressionBuilderGetQuery.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function isNullNonLiteralString(EntityManagerInterface $em): void
2020
{
2121
$field = strtolower('field'); // Non literal-string, e.g. $_POST['field'];
2222
$result = $em->createQueryBuilder()->expr()->isNull($field);
23-
assertType('string', $result);
23+
assertType("'field IS NULL'", $result);
2424
}
2525

2626
public function isNotNullLiteralString(EntityManagerInterface $em): void
@@ -33,7 +33,7 @@ public function isNotNullNonLiteralString(EntityManagerInterface $em): void
3333
{
3434
$field = strtolower('field'); // Non literal-string, e.g. $_POST['field'];
3535
$result = $em->createQueryBuilder()->expr()->isNotNull($field);
36-
assertType('string', $result);
36+
assertType("'field IS NOT NULL'", $result);
3737
}
3838

3939
public function countDistinctLiteralString(EntityManagerInterface $em): void
@@ -46,7 +46,7 @@ public function countDistinctNonLiteralString(EntityManagerInterface $em): void
4646
{
4747
$field = strtolower('B'); // Non literal-string, e.g. $_POST['field'];
4848
$result = $em->createQueryBuilder()->expr()->countDistinct('A', $field, 'C');
49-
assertType('string', $result);
49+
assertType("'COUNT(DISTINCT A, b, C)'", $result);
5050
}
5151

5252
public function betweenLiteralString(EntityManagerInterface $em): void
@@ -59,7 +59,7 @@ public function betweenNonLiteralString(EntityManagerInterface $em): void
5959
{
6060
$value_1 = strtolower('B'); // Non literal-string, e.g. $_POST['field'];
6161
$result = $em->createQueryBuilder()->expr()->between('field', "'" . $value_1 . "'", "'value_2'");
62-
assertType('string', $result);
62+
assertType("'field BETWEEN \'b\' AND \'value_2\''", $result);
6363
}
6464

6565
// Might be a problem, as these do not return a 'literal-string'.

0 commit comments

Comments
 (0)