public function testCanDeleteIcon()
{
$service = $this->createService();
$file = new \ElggFile();
$file->owner_guid = 1;
$file->setFilename('400x300.gif');
$file->mimetype = 'image/gif';
$service->saveIconFromElggFile($this->entity, $file);
$this->assertTrue($service->hasIcon($this->entity, 'master'));
$this->assertTrue($service->hasIcon($this->entity, 'large'));
$this->assertTrue($service->hasIcon($this->entity, 'medium'));
$this->assertTrue($service->hasIcon($this->entity, 'small'));
$this->assertTrue($service->hasIcon($this->entity, 'tiny'));
$this->assertTrue($service->hasIcon($this->entity, 'topbar'));
$service->deleteIcon($this->entity);
$this->assertFalse($service->hasIcon($this->entity, 'master'));
$this->assertFalse($service->hasIcon($this->entity, 'large'));
$this->assertFalse($service->hasIcon($this->entity, 'medium'));
$this->assertFalse($service->hasIcon($this->entity, 'small'));
$this->assertFalse($service->hasIcon($this->entity, 'tiny'));
$this->assertFalse($service->hasIcon($this->entity, 'topbar'));
}