Ejemplo n.º 1
0
 public function testCompositeConstructor()
 {
     $j = new Join(['foo1', 'foo2'], ['bar1', 'bar2'], 'LEFT JOIN');
     $expect = [['left' => 'foo1', 'operator' => '=', 'right' => 'bar1'], ['left' => 'foo2', 'operator' => '=', 'right' => 'bar2']];
     $this->assertEquals($expect, $j->getConditions());
     $this->assertEquals('LEFT JOIN', $j->getJoinType());
 }
Ejemplo n.º 2
0
 /**
  * @param null|Join $join
  * @return bool
  */
 public function equals($join)
 {
     $parametersOfThisClauses = array();
     $parametersOfJoinClauses = array();
     return null !== $join && $join instanceof Join && $this->getJoinType() === $join->getJoinType() && $this->getConditions() == $join->getConditions() && $this->getClause($parametersOfThisClauses) == $join->getClause($parametersOfJoinClauses);
 }