/** * @covers Robo47_Service_Gravatar::__construct */ public function testConstructWithOptions() { $options = array('default' => '404', 'rating' => Robo47_Service_Gravatar::RATING_X, 'size' => 200, 'cachePrefix' => 'foo_', 'cache' => Zend_Cache::factory('Core', new Robo47_Cache_Backend_Array())); $service = new Robo47_Service_Gravatar($options); $this->assertEquals($options['default'], $service->getDefault(), 'default is wrong'); $this->assertEquals($options['rating'], $service->getRating(), 'rating is wrong'); $this->assertEquals($options['size'], $service->getSize(), 'size is wrong'); $this->assertEquals($options['cachePrefix'], $service->getCachePrefix(), 'cachePrefix is wrong'); $this->assertSame($options['cache'], $service->getCache(), 'cache is wrong'); }