$this->assertNotEqual($q->getQuery(),"SELECT e.id AS e__id, e.status AS e__status, e.text AS e__text, e2.id AS e2__id, e2.status AS e2__status, e3.text AS e3__text FROM enum_test e INNER JOIN enum_test2 e2 ON e.id = e2.enum_test_id LEFT JOIN enum_test3 e3 ON e.text = e3.text WHERE e.id IN (SELECT DISTINCT e4.id FROM enum_test e4 INNER JOIN enum_test2 e5 ON e4.id = e5.enum_test_id LEFT JOIN enum_test3 e6 ON e4.text = e6.text WHERE e4.status = 'verified' LIMIT 1) AND e.status = 'verified'");
}catch(Exception$e){
$this->fail();
}
$this->assertEqual($q->getQuery(),"SELECT e.id AS e__id, e.status AS e__status, e.text AS e__text, e2.text AS e2__text FROM enum_test e LEFT JOIN enum_test3 e2 ON e.text = e2.text WHERE e.status = 1");