isNotIn() public static method

public static isNotIn ( array $values )
$values array
 /**
  * @test
  */
 public function shouldReturnNullForEmptyArray()
 {
     //given
     $restriction = Restrictions::isNotIn(array());
     //when
     $sql = $restriction->toSql('category_id');
     //then
     $this->assertNull($sql);
 }
Example #2
0
 /**
  * @test
  */
 public function shouldReturnModelUsingIsNotInRestrictionWithEmptyArrayAndMultipleItemsInWhereClauseWithSeveralWhere()
 {
     //given
     $product = Product::create(array('name' => 'name1', 'description' => 'desc'));
     //when
     $loadedProduct = Product::where(array('description' => 'desc'))->where(array('name' => Restrictions::isNotIn(array())))->fetch();
     //then
     Assert::thatModel($loadedProduct)->isEqualTo($product);
 }