public function testReturnArrayOnReadWithQuery()
{
$data = new MockResult(array('records' => array(array('1', '2', 'Post title', '2012-12-17 17:04:00', '3', '1', '2', 'Very good post', '2012-12-17 17:05:00', '1', '2', 'Post title', '2012-12-17 17:04:00'))));
$this->_db->return = array('_execute' => $data);
$query = new Query(array('type' => 'read', 'model' => $this->_model, 'with' => array('MockDatabaseComment.MockDatabasePost')));
$result = $this->_db->read($query, array('return' => 'array'));
$expected = array(array('id' => '1', 'author_id' => '2', 'title' => 'Post title', 'created' => '2012-12-17 17:04:00', 'MockDatabaseComment' => array('id' => '3', 'post_id' => '1', 'author_id' => '2', 'body' => 'Very good post', 'created' => '2012-12-17 17:05:00', 'MockDatabasePost' => array('id' => '1', 'author_id' => '2', 'title' => 'Post title', 'created' => '2012-12-17 17:04:00'))));
$this->assertEqual($expected, $result);
}