-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove extension from URL to avoid to load the same image content
- Loading branch information
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,25 +9,25 @@ class GravatarTest extends TestCase | |
{ | ||
public function testDefaultUrlValues() | ||
{ | ||
$this->assertRegExp('#^https://www\.gravatar\.com/avatar/\d+\.jpg\?d=retro&size=80#', Gravatar::gravatarUrl()); | ||
$this->assertRegExp('#^https://www\.gravatar\.com/avatar/\d+\?d=retro&size=80#', Gravatar::gravatarUrl()); | ||
} | ||
|
||
public function testGravatarUrlAcceptsCustomMode() | ||
{ | ||
$this->assertRegExp('#^https://www\.gravatar\.com/avatar/\d+\.jpg\?d=mp&size=80#', Gravatar::gravatarUrl('mp')); | ||
$this->assertRegExp('#^https://www\.gravatar\.com/avatar/\d+\?d=mp&size=80#', Gravatar::gravatarUrl('mp')); | ||
} | ||
|
||
public function testGravatarUrlAcceptsCustomSize() | ||
{ | ||
$this->assertRegExp('#^https://www\.gravatar\.com/avatar/\d+\.jpg\?d=retro&size=200#', Gravatar::gravatarUrl(null, null, 200)); | ||
$this->assertRegExp('#^https://www\.gravatar\.com/avatar/\d+\?d=retro&size=200#', Gravatar::gravatarUrl(null, null, 200)); | ||
} | ||
|
||
public function testGravatarUrlAcceptsCustomEmail() | ||
{ | ||
$email = '[email protected]'; | ||
$hash = md5(strtolower($email)); | ||
|
||
$this->assertRegExp("#^https://www\.gravatar\.com/avatar/${hash}\.jpg\?d=retro&size=80#", Gravatar::gravatarUrl(null, $email)); | ||
$this->assertRegExp("#^https://www\.gravatar\.com/avatar/${hash}\?d=retro&size=80#", Gravatar::gravatarUrl(null, $email)); | ||
} | ||
|
||
public function testDownloadWithDefaults() | ||
|