/**
  * @dataProvider providerForEmptyValues
  */
 public function testAppendPsToWithNotInAndEmptyValueCreatesAnAlwaysTrueCondition($emptyValue)
 {
     $cton = new InCriterion(new Criteria(), 'A.COL', $emptyValue, Criteria::NOT_IN);
     $params = array();
     $ps = '';
     $cton->appendPsTo($ps, $params);
     $this->assertEquals('1=1', $ps);
     $expected = array();
     $this->assertEquals($expected, $params);
 }
Beispiel #2
0
 public function testAppendPsToWithArrayCollection()
 {
     $collection = new ArrayCollection(['foo']);
     $cton = new InCriterion(new Criteria(), 'A.COL', $collection);
     $params = [];
     $ps = '';
     $cton->appendPsTo($ps, $params);
     $this->assertEquals('A.COL IN (:p1)', $ps);
     $expected = [['table' => 'A', 'column' => 'COL', 'value' => 'foo']];
     $this->assertEquals($expected, $params);
 }