Skip to content

Commit f85933f

Browse files
authored
Update DistanceTest.php
1 parent baea723 commit f85933f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/DistanceTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,19 @@ protected function getExpectedSqlStatements(): array
2020
{
2121
return [
2222
"SELECT (c0_.point <@> '(2.320041, 48.858889)') AS sclr_0 FROM ContainsPoints c0_",
23+
"SELECT (c0_.point <@> point2) AS sclr_0 FROM ContainsPoints c0_",
24+
"SELECT ('(1.0, 1.0)' <@> '(2.0, 2.0)') AS sclr_0 FROM ContainsPoints c0_",
25+
"SELECT (CASE WHEN (c0_.point IS NULL) THEN NULL ELSE (c0_.point <@> '(0.0, 0.0)') END) AS sclr_0 FROM ContainsPoints c0_",
2326
];
2427
}
2528

2629
protected function getDqlStatements(): array
2730
{
2831
return [
2932
\sprintf("SELECT DISTANCE(e.point, '(2.320041, 48.858889)') FROM %s e", ContainsPoints::class),
33+
\sprintf("SELECT DISTANCE(e.point, point2) FROM %s e", ContainsPoints::class),
34+
\sprintf("SELECT DISTANCE('(1.0, 1.0)', '(2.0, 2.0)') FROM %s e", ContainsPoints::class),
35+
\sprintf("SELECT CASE WHEN e.point IS NULL THEN NULL ELSE DISTANCE(e.point, '(0.0, 0.0)') END FROM %s e", ContainsPoints::class),
3036
];
3137
}
3238
}

0 commit comments

Comments
 (0)