Skip to content
Extraits de code Groupes Projets
Valider a2d44f50 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

refs #4610 might fix integration tests

parent 1fba8fff
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -52,7 +52,7 @@ class GenerateApi extends GeneratePluginBase
$pluginNames = $this->getPluginNamesHavingNotSpecificFile('API.php');
$invalidName = 'You have to enter the name of an existing plugin which does not already have an API';
return parent::getPluginName($input, $output, $pluginNames, $invalidName);
return $this->askPluginNameAndValidate($input, $output, $pluginNames, $invalidName);
}
}
......@@ -86,6 +86,6 @@ class GenerateCommand extends GeneratePluginBase
$pluginNames = $this->getPluginNames();
$invalidName = 'You have to enter the name of an existing plugin';
return parent::getPluginName($input, $output, $pluginNames, $invalidName);
return $this->askPluginNameAndValidate($input, $output, $pluginNames, $invalidName);
}
}
......@@ -52,7 +52,7 @@ class GenerateController extends GeneratePluginBase
$pluginNames = $this->getPluginNamesHavingNotSpecificFile('Controller.php');
$invalidName = 'You have to enter the name of an existing plugin which does not already have a Controller';
return parent::getPluginName($input, $output, $pluginNames, $invalidName);
return $this->askPluginNameAndValidate($input, $output, $pluginNames, $invalidName);
}
}
......@@ -116,7 +116,7 @@ class GeneratePluginBase extends ConsoleCommand
* @return array
* @throws \RunTimeException
*/
protected function getPluginName(InputInterface $input, OutputInterface $output, $pluginNames, $invalidArgumentException)
protected function askPluginNameAndValidate(InputInterface $input, OutputInterface $output, $pluginNames, $invalidArgumentException)
{
$validate = function ($pluginName) use ($pluginNames, $invalidArgumentException) {
if (!in_array($pluginName, $pluginNames)) {
......
......@@ -52,7 +52,7 @@ class GenerateSettings extends GeneratePluginBase
$pluginNames = $this->getPluginNamesHavingNotSpecificFile('Settings.php');
$invalidName = 'You have to enter the name of an existing plugin which does not already have settings';
return parent::getPluginName($input, $output, $pluginNames, $invalidName);
return $this->askPluginNameAndValidate($input, $output, $pluginNames, $invalidName);
}
}
......@@ -110,7 +110,7 @@ class GenerateTest extends GeneratePluginBase
$pluginNames = $this->getPluginNames();
$invalidName = 'You have to enter the name of an existing plugin';
return parent::getPluginName($input, $output, $pluginNames, $invalidName);
return $this->askPluginNameAndValidate($input, $output, $pluginNames, $invalidName);
}
/**
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter