public function testMergeWhere() { $this->queryBuilder->where('id', 5, SelectQueryBuilder::LESS_THAN); $qb = new SelectQueryBuilder(); $qb->_open(SelectQueryBuilder::LOGICAL_OR)->where('title', 'Dune', SelectQueryBuilder::NOT_EQUALS, null)->_close(); $this->queryBuilder->mergeWhere($qb); $expected = array(array('column' => 'id', 'value' => 5, 'operator' => '<', 'connector' => 'AND'), array('bracket' => '(', 'connector' => 'OR'), array('column' => 'title', 'value' => 'Dune', 'operator' => '!=', 'connector' => 'AND'), array('bracket' => ')', 'connector' => NULL)); $this->assertEquals($expected, $this->queryBuilder->getWhereParts()); }