Add info about no help information for the command

This commit is contained in:
Jakub Turek 2015-03-08 12:32:36 +01:00
parent e4bab08d3f
commit 342a468214
2 changed files with 14 additions and 0 deletions

View file

@ -180,6 +180,12 @@ abstract class AbstractCommand
}
}
if (empty($output)) {
$output .= "\n";
$output .= "<red><bold>Sorry, there's no help for this command at the moment.</bold></red>";
$output .= "\n";
}
return $output;
}
}

View file

@ -229,6 +229,14 @@ class AbstractCommandTest extends BaseTest
. " <green>mage example</green>\n"
. " * Runs the command with lights:\n"
. " <green>mage example light</green>\n"
),
"no_info_at_all" => array(
'name' => '',
'helpMessage' => '',
'examples' => array(),
'syntax' => '',
'output' => "\n"
. "<red><bold>Sorry, there's no help for this command at the moment.</bold></red>\n"
)
);
}