/**
  * Executes this task with all arguments and options from commandline
  *
  * @param array $arguments Arguments as read from commandline
  * @param array $options   Options as read from commandline
  *
  * @return void
  * @see sfTask
  */
 protected function execute($arguments = array(), $options = array())
 {
     if (count($options) || $this->askConfirmation('Do you really want to delete all generated images?', 'QUESTION', false)) {
         $cache = sfImageTransformExtraPluginConfiguration::getCache();
         $this->route->preassemblePattern($options);
         $cache->removePattern($this->route);
         $this->logSection('-files', 'Removed all matching files.');
     } else {
         $this->logSection('no action', 'No files were removed.');
     }
 }
 /**
  * @expectedException sfImageTransformExtraPluginConfigurationException
  */
 public function testRemoveOldThumbnailsWithoutRoute()
 {
     $event = new sfEvent($this, 'sf_image_transform.changed_source', array());
     sfImageTransformExtraPluginConfiguration::removeOldThumbnails($event);
 }