/**
  * Remove plugin from ForgeUpgrade configuration
  *
  * Keep migration scripts in DB, it doesn't matter.
  *
  * @param String $name Plugin's name
  */
 protected function uninstallForgeUpgrade($name)
 {
     try {
         $this->forgeupgrade_config->loadDefaults();
         $this->forgeupgrade_config->removePath($GLOBALS['sys_pluginsroot'] . $name);
     } catch (Exception $e) {
         $GLOBALS['Response']->addFeedback('warning', "ForgeUpgrade configuration update failed: " . $e->getMessage());
     }
 }
 public function testRemovePathInTheMiddleOfFile()
 {
     $configFile = $this->fixtures . '/forgeupgrade-addpath.ini';
     copy($this->fixtures . '/forgeupgrade-config-docman.ini', $configFile);
     $fuc = new ForgeUpgradeConfig($this->command, $configFile);
     $this->assertTrue($fuc->existsInPath('/usr/share/tuleap/plugins/webdav'));
     $fuc->removePath('/usr/share/tuleap/plugins/webdav');
     $this->assertFalse($fuc->existsInPath('/usr/share/tuleap/plugins/webdav'));
     // Verify by loading it again
     $fuc2 = new ForgeUpgradeConfig($this->command, $configFile);
     $this->assertFalse($fuc2->existsInPath('/usr/share/tuleap/plugins/webdav'));
     unlink($configFile);
 }