public function testNestedExpression()
 {
     $sql = $this->transformer->transform(Where::any([Where::field('first_name')->equals('John'), Where::all([Where::field('last_name')->equals('Smith'), Where::field('age')->between(20, 40)]), Where::field('last_name')->contains('Jorge')]), $this->config);
     $this->assertEquals('(phpunit.first_name = ? OR (phpunit.last_name = ? AND (phpunit.age >= ? AND phpunit.age <= ?)) OR phpunit.last_name LIKE ?)', $sql->getWhere());
     $this->assertEquals(['John', 'Smith', 20, 40, '%Jorge%'], $sql->getParameters());
 }
 public function testAnyMatch()
 {
     $filter = $this->transformer->transform(Where::any([Where::field('name')->equals('Jane'), Where::field('age')->equals(31)]), $this->config);
     $result = array_filter($this->data, $filter);
     $this->assertEquals(['jane', 'joey'], array_keys($result));
 }
 public function testAnyMatch()
 {
     $result = $this->find(Where::any([Where::field('name')->equals('Jane'), Where::field('age')->equals(31)]));
     $this->assertEquals(['jane', 'joey'], $result);
 }