public function testReturn() { $g = new Horde_Service_Gravatar(); $this->assertType('string', $g->getId('test')); } public function testAddress() { $g = new Horde_Service_Gravatar(); $this->assertEquals( '0c17bf66e649070167701d2d3cd71711', $g->getId('test@example.org') ); } /** * @dataProvider provideAddresses */ public function testAddresses($mail, $id) { $g = new Horde_Service_Gravatar(); $this->assertEquals($id, $g->getId($mail)); } public function provideAddresses() { return array( array('test@example.org', '0c17bf66e649070167701d2d3cd71711'), array('x@example.org', 'ae46d8cbbb834a85db7287f8342d0c42'), array('test@example.com', '55502f40dc8b7c769880b10874abc9d0'), ); }