File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
test/testsuite/runtime/query Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -563,10 +563,14 @@ public function getClause(&$params)
563563 */
564564 public function equals ($ join )
565565 {
566+ $ parametersOfThisClauses = array ();
567+ $ parametersOfJoinClauses = array ();
568+
566569 return $ join !== null
567570 && $ join instanceof Join
568571 && $ this ->getJoinType () == $ join ->getJoinType ()
569- && $ this ->getConditions () == $ join ->getConditions ();
572+ && $ this ->getConditions () == $ join ->getConditions ()
573+ && $ this ->getClause ($ parametersOfThisClauses ) == $ join ->getClause ($ parametersOfJoinClauses );
570574 }
571575
572576 /**
Original file line number Diff line number Diff line change @@ -186,6 +186,10 @@ public function testEquality()
186186 $ j7 = new Join ('foo ' , 'bar ' , 'INNER JOIN ' );
187187 $ this ->assertTrue ($ j5 ->equals ($ j7 ), 'Join without specified join type should be equal
188188 to INNER JOIN, as it fallback to default join type ' );
189+
190+ $ j8 = new Join ('foo ' , 'bar ' , 'INNER JOIN ' );
191+ $ j8 ->addCondition ('baz.foo ' , 'baz.bar ' );
192+ $ this ->assertFalse ($ j5 ->equals ($ j8 ));
189193 }
190194
191195 public function testCountConditions ()
You can’t perform that action at this time.
0 commit comments