コード例 #1
0
ファイル: JoinTest.php プロジェクト: disider/Propel2
 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());
 }