Beispiel #1
0
 public function testAddConditions()
 {
     $j = new Join();
     $j->addCondition('foo', 'bar');
     $j->addCondition('baz', 'bal');
     $expect = [['left' => 'foo', 'operator' => '=', 'right' => 'bar'], ['left' => 'baz', 'operator' => '=', 'right' => 'bal']];
     $this->assertEquals(['=', '='], $j->getOperators());
     $this->assertEquals(['foo', 'baz'], $j->getLeftColumns());
     $this->assertEquals(['bar', 'bal'], $j->getRightColumns());
     $this->assertEquals($expect, $j->getConditions());
 }