Example #1
0
 public function testParamsParsing()
 {
     $database = new Database('mysql', 'localhost', 'test');
     $table = new Table($database, 'test');
     $data = ['test', 'test2'];
     $this->assertEquals("\"id\" = '1' AND (\"data\" IN ('test', 'test2') OR date BETWEEN '2016-05-14' AND '2016-05-16') OR 1", $table->getConditionsQuery(['id' => 1, '(' . $table->getConditionsQuery(['data' => $data, "date BETWEEN '2016-05-14' AND '2016-05-16'"], Table::OPERATOR_OR) . ')', '1'], [Table::OPERATOR_AND, Table::OPERATOR_OR]));
 }