You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -45,18 +36,12 @@ public function it_generates_sql_query_for_withinDistanceTo_scope(): void
45
36
46
37
// 3. Assert
47
38
$this->assertEquals(
48
-
expected: "select *, CONCAT(ST_AsText(addresses.$castedAttr, 'axis-order=long-lat'), ',', ST_SRID(addresses.$castedAttr)) as $castedAttr from `addresses` where ST_Distance(
49
-
ST_SRID($castedAttr, ?),
50
-
ST_SRID(Point(?, ?), ?)
51
-
) <= ?",
39
+
expected: "select *, CONCAT(ST_AsText(addresses.$castedAttr, 'axis-order=long-lat'), ',', ST_SRID(addresses.$castedAttr)) as $castedAttr from `addresses` where ST_Distance(ST_SRID($castedAttr, ?), ST_SRID(Point(?, ?), ?)) <= ?",
@@ -69,26 +54,17 @@ public function it_generates_sql_query_for_orderByDistanceTo_scope(): void
69
54
70
55
// 3. Assert
71
56
$this->assertEquals(
72
-
expected: "select *, CONCAT(ST_AsText(addresses.$castedAttr, 'axis-order=long-lat'), ',', ST_SRID(addresses.$castedAttr)) as $castedAttr from `addresses` order by ST_Distance(
73
-
ST_SRID($castedAttr, ?),
74
-
ST_SRID(Point(?, ?), ?)
75
-
) asc",
57
+
expected: "select *, CONCAT(ST_AsText(addresses.$castedAttr, 'axis-order=long-lat'), ',', ST_SRID(addresses.$castedAttr)) as $castedAttr from `addresses` order by ST_Distance(ST_SRID($castedAttr, ?), ST_SRID(Point(?, ?), ?)) asc",
76
58
actual: $queryForAsc->toSql()
77
59
);
78
60
79
61
$this->assertEquals(
80
-
expected: "select *, CONCAT(ST_AsText(addresses.$castedAttr, 'axis-order=long-lat'), ',', ST_SRID(addresses.$castedAttr)) as $castedAttr from `addresses` order by ST_Distance(
81
-
ST_SRID($castedAttr, ?),
82
-
ST_SRID(Point(?, ?), ?)
83
-
) desc",
62
+
expected: "select *, CONCAT(ST_AsText(addresses.$castedAttr, 'axis-order=long-lat'), ',', ST_SRID(addresses.$castedAttr)) as $castedAttr from `addresses` order by ST_Distance(ST_SRID($castedAttr, ?), ST_SRID(Point(?, ?), ?)) desc",
0 commit comments