Skip to content

Commit 5bd09c3

Browse files
committed
Fixed JoinTest syntax error.
1 parent 7a40943 commit 5bd09c3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/Functional/JoinTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function ($r1, $r2) {
4242
return $r1('other')->eq($r2('id'));
4343
}
4444
)
45-
->orderBy(array(r\row("left")->getField("id"), r\row("right")->getField("id")))
45+
->orderBy(array(function($x) { return $x("left")->getField("id"); }, function($x) { return $x("right")->getField("id"); }))
4646
->run($this->conn);
4747

4848
$this->assertEquals($excpected, $this->orderArrayByLeftAndRightId($res));
@@ -68,7 +68,7 @@ function ($r1, $r2) {
6868
return $r1('other')->eq($r2('id'));
6969
}
7070
)
71-
->orderBy(array(r\row("left")->getField("id"), r\row("right")->getField("id")))
71+
->orderBy(array(function($x) { return $x("left")->getField("id"); }, function($x) { return $x("right")->getField("id"); }))
7272
->run($this->conn);
7373

7474
$this->assertEquals($excpected, $this->orderArrayByLeftAndRightId($res));
@@ -98,7 +98,7 @@ function ($r1, $r2) {
9898
return $r1('other')->eq($r2('id'));
9999
}
100100
)
101-
->orderBy(array(r\row("left")->getField("id"), r\row("right")->getField("id")))
101+
->orderBy(array(function($x) { return $x("left")->getField("id"); }, function($x) { return $x("right")->getField("id"); }))
102102
->run($this->conn);
103103

104104
$this->assertEquals($excpected, $this->orderArrayByLeftAndRightId($res));
@@ -125,7 +125,7 @@ function ($r1, $r2) {
125125
return $r1('other')->eq($r2('id'));
126126
}
127127
)
128-
->orderBy(array(r\row("left")->getField("id"), r\row("right")->getField("id")))
128+
->orderBy(array(function($x) { return $x("left")->getField("id"); }, function($x) { return $x("right")->getField("id"); }))
129129
->run($this->conn);
130130

131131
$this->assertEquals($excpected, $this->orderArrayByLeftAndRightId($res));
@@ -150,7 +150,7 @@ public function testEqJoinOther()
150150

151151
$res = $this->db()->table('t1')
152152
->eqJoin('other', $this->db()->table('t2'))
153-
->orderBy(array(r\row("left")->getField("id"), r\row("right")->getField("id")))
153+
->orderBy(array(function($x) { return $x("left")->getField("id"); }, function($x) { return $x("right")->getField("id"); }))
154154
->run($this->conn);
155155

156156
$this->assertEquals($excpected, $this->orderArrayByLeftAndRightId($res));
@@ -171,7 +171,7 @@ public function testEqJoinId()
171171

172172
$res = $this->db()->table('t1')
173173
->eqJoin('id', $this->db()->table('t2'), array('index' => 'other'))
174-
->orderBy(array(r\row("left")->getField("id"), r\row("right")->getField("id")))
174+
->orderBy(array(function($x) { return $x("left")->getField("id"); }, function($x) { return $x("right")->getField("id"); }))
175175
->run($this->conn);
176176

177177
$this->assertEquals($excpected, $this->orderArrayByLeftAndRightId($res));
@@ -198,7 +198,7 @@ public function testEqJoinFunc()
198198
->eqJoin(function ($x) {
199199
return $x('other');
200200
}, $this->db()->table('t2'))
201-
->orderBy(array(r\row("left")->getField("id"), r\row("right")->getField("id")))
201+
->orderBy(array(function($x) { return $x("left")->getField("id"); }, function($x) { return $x("right")->getField("id"); }))
202202
->run($this->conn);
203203

204204
$this->assertEquals($excpected, $this->orderArrayByLeftAndRightId($res));

0 commit comments

Comments
 (0)