Beispiel #1
0
 public function testRetrievingWherePartsReturnsSpecificationArrayOfIdentifierAndValuesAndArrayOfTypes()
 {
     $in = new In();
     $in->setIdentifier('foo.bar')->setValueSet(array(1, 2, 3));
     $expected = array(array('%s IN (%s, %s, %s)', array('foo.bar', 1, 2, 3), array(In::TYPE_IDENTIFIER, In::TYPE_VALUE, In::TYPE_VALUE, In::TYPE_VALUE)));
     $this->assertEquals($expected, $in->getExpressionData());
 }
Beispiel #2
0
 public function testGetExpressionDataWithSubselectAndArrayIdentifier()
 {
     $select = new Select();
     $in = new In(array('foo', 'bar'), $select);
     $expected = array(array('(%s, %s) IN %s', array('foo', 'bar', $select), array($in::TYPE_IDENTIFIER, $in::TYPE_IDENTIFIER, $in::TYPE_VALUE)));
     $this->assertEquals($expected, $in->getExpressionData());
 }
Beispiel #3
0
 public function testGetExpressionDataWithSubselect()
 {
     $in = new In('foo', $select = new Select());
     $expected = array(array('%s IN %s', array('foo', $select), array($in::TYPE_IDENTIFIER, $in::TYPE_VALUE)));
     $this->assertEquals($expected, $in->getExpressionData());
 }