public function testQueryOperators()
{
$query = new Query(array('type' => 'read', 'model' => $this->_model, 'conditions' => array('title' => array('regexp' => '^[a-z0-9]+(\\w)*$'))));
$expected = "SELECT * FROM `mock_database_posts` AS `MockDatabasePost` WHERE ";
$expected .= "(`title` REGEXP '^[a-z0-9]+(\\w)*\$');";
$result = $this->_db->renderCommand($query);
$this->assertEqual($expected, $result);
$query = new Query(array('type' => 'read', 'model' => $this->_model, 'conditions' => array('title' => array('not regexp' => '^[a-z0-9]+(\\w)*$'))));
$expected = "SELECT * FROM `mock_database_posts` AS `MockDatabasePost` WHERE ";
$expected .= "(`title` NOT REGEXP '^[a-z0-9]+(\\w)*\$');";
$result = $this->_db->renderCommand($query);
$this->assertEqual($expected, $result);
$query = new Query(array('type' => 'read', 'model' => $this->_model, 'conditions' => array('title' => array('sounds like' => 'foo'))));
$expected = "SELECT * FROM `mock_database_posts` AS `MockDatabasePost` WHERE ";
$expected .= "(`title` SOUNDS LIKE 'foo');";
$result = $this->_db->renderCommand($query);
$this->assertEqual($expected, $result);
}