/** * @fn test_tomorrow * @short Test method for tomorrow. */ public function test_gravatar_url() { $email = '*****@*****.**'; $size = 40; $default = 'http://www.emeraldion.it/images/avatar.png'; $grav_url = 'http://www.gravatar.com/avatar.php?gravatar_id=' . md5($email) . '&default=' . urlencode($default) . '&size=' . $size; $this->assertEquals($grav_url, Gravatar::gravatar_url($email, $size, $default), 'Bad gravatar URL'); }
<div class="lighter" style="float:right"> <?php printf(l('Comment issued on %s'), $comment->human_readable_date()); ?> <a href="<?php echo $comment->permalink(); ?> " title="<?php echo h(l('Permalink for comment')); ?> #<?php echo $comment->id; ?> ">#</a> </div> <h4><?php printf(l('%s says:'), empty($comment->URL) ? $comment->author : a($comment->author, array('href' => $comment->URL))); ?> </h4> <img class="diario-gravatar" src="<?php echo Gravatar::gravatar_url($comment->email); ?> " alt="Gravatar" /> <div class="diario-comment-text"> <p> <?php echo $comment->pretty_text(); ?> </p> </div> </div>