public function testRenderArrayJoin()
{
$model = 'lithium\\tests\\mocks\\data\\model\\MockQueryComment';
$query = new Query(compact('model') + array('type' => 'read', 'source' => 'comments', 'alias' => 'Comment', 'conditions' => array('Comment.id' => 1), 'joins' => array(array('mode' => 'INNER', 'source' => 'posts', 'alias' => 'Post', 'constraints' => array('Comment.post_id' => 'Post.id')))));
$expected = "SELECT * FROM {comments} AS {Comment} INNER JOIN {posts} AS {Post} ON ";
$expected .= "{Comment}.{post_id} = {Post}.{id} WHERE {Comment}.{id} = 1;";
$result = $this->_db->renderCommand($query);
$this->assertEqual($expected, $result);
}