forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Gravatar helper to use auto-detection for pre-hashed email ad…
…dresses
- Loading branch information
1 parent
6670c9e
commit 7953028
Showing
2 changed files
with
13 additions
and
35 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 |
---|---|---|
|
@@ -92,7 +92,6 @@ public function testGetAndSetMethods() | |
$this->helper->setDefaultImg('monsterid') | ||
->setImgSize(150) | ||
->setSecure(true) | ||
->setSkipEmailHash(true) | ||
->setEmail("[email protected]") | ||
->setAttribs($attribs) | ||
->setRating('pg'); | ||
|
@@ -102,7 +101,6 @@ public function testGetAndSetMethods() | |
$this->assertEquals($attribs, $this->helper->getAttribs()); | ||
$this->assertEquals(150, $this->helper->getImgSize()); | ||
$this->assertTrue($this->helper->getSecure()); | ||
$this->assertTrue($this->helper->getSkipEmailHash()); | ||
} | ||
|
||
public function tesSetDefaultImg() | ||
|
@@ -190,15 +188,15 @@ public function testGravatarOptions() | |
); | ||
} | ||
|
||
public function testSkipEmailHashingOptionTogglesMd5Hashing() | ||
public function testPassingAnMd5HashSkipsMd5Hashing() | ||
{ | ||
$this->assertNotContains( | ||
'b642b4217b34b1e8d3bd915fc65c4452', | ||
$this->helper->__invoke('b642b4217b34b1e8d3bd915fc65c4452')->__toString() | ||
'[email protected]', | ||
$this->helper->__invoke('[email protected]')->__toString() | ||
); | ||
$this->assertContains( | ||
'b642b4217b34b1e8d3bd915fc65c4452', | ||
$this->helper->__invoke('b642b4217b34b1e8d3bd915fc65c4452', array('skip_email_hash' => true))->__toString() | ||
$this->helper->__invoke('b642b4217b34b1e8d3bd915fc65c4452')->__toString() | ||
); | ||
} | ||
|
||
|