Added test against alternate default URL

This commit is contained in:
Joshua Sherman 2014-01-11 19:33:34 -05:00
parent 36d86100f9
commit 74611b9e74
2 changed files with 10 additions and 2 deletions

View file

@ -47,13 +47,21 @@ class API_Gravatar_Test extends PHPUnit_Framework_TestCase
/**
* @expectedException Exception
* @expectedExceptionMessage Invalid rating perameter, expecting g, pg, r or x.
* @expectedExceptionMessage Invalid rating parameter, expecting g, pg, r or x.
*/
public function testImgInvalidRating()
{
API_Gravatar::img('foo@bar.com', 80, 'gravatar', 'sexytime');
}
public function testURLDefault()
{
$this->assertEquals(
'<img src="http://www.gravatar.com/avatar/f3ada405ce890b6f8204094deb12d8a8?s=80&d=http%253A%252F%252Fexample.org%252Ficon&r=g">',
API_Gravatar::img('foo@bar.com', 80, 'http://example.org/icon')
);
}
public function testImg()
{
$this->assertEquals(