[Console] Fixed tests about message exception when command is not available
This commit is contained in:
parent
a4d2d31a9d
commit
039264d2d2
|
@ -496,7 +496,12 @@ class Application
|
|||
}
|
||||
|
||||
if ($alternatives = $this->findAlternativeNamespace($part, $abbrevs)) {
|
||||
$message .= "\n\nDid you mean one of these?\n ";
|
||||
if (1 == count($alternatives)) {
|
||||
$message .= "\n\nDid you mean this?\n ";
|
||||
} else {
|
||||
$message .= "\n\nDid you mean one of these?\n ";
|
||||
}
|
||||
|
||||
$message .= implode("\n ", $alternatives);
|
||||
}
|
||||
|
||||
|
@ -571,7 +576,11 @@ class Application
|
|||
$message = sprintf('Command "%s" is not defined.', $name);
|
||||
|
||||
if ($alternatives = $this->findAlternativeCommands($searchName, $abbrevs)) {
|
||||
$message .= "\n\nDid you mean one of these?\n ";
|
||||
if (1 == count($alternatives)) {
|
||||
$message .= "\n\nDid you mean this?\n ";
|
||||
} else {
|
||||
$message .= "\n\nDid you mean one of these?\n ";
|
||||
}
|
||||
$message .= implode("\n ", $alternatives);
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue