/** * Setup Gravatar * * @param array $options * @return Robo47_Service_Gravatar */ protected function _setupService($options) { $gravatar = new Robo47_Service_Gravatar(); if (isset($options['rating'])) { $gravatar->setRating($options['rating']); } if (isset($options['size'])) { $gravatar->setSize($options['size']); } if (isset($options['default'])) { $gravatar->setDefault($options['default']); } if (isset($options['cachePrefix'])) { $gravatar->setCachePrefix($options['cachePrefix']); } if (isset($options['useSSL'])) { $gravatar->useSSL($options['useSSL']); } if (isset($options['cache'])) { $gravatar->setCache($options['cache']); } if (isset($options['registryKey'])) { Zend_Registry::set($options['registryKey'], $gravatar); } return $gravatar; }
/** * @covers Robo47_Service_Gravatar::useSSL * @covers Robo47_Service_Gravatar::usesSSL * @dataProvider usesSSLProvider */ public function testUseSSLUsesSSL($flag, $expected) { $service = new Robo47_Service_Gravatar(); $return = $service->useSSL($flag); $this->assertSame($return, $service, 'Fluent Interface failed'); $this->assertSame($expected, $service->usesSSL()); }