Browse Source

Add info about no help information for the command

1.0
Jakub Turek 10 years ago
parent
commit
342a468214
  1. 6
      Mage/Command/AbstractCommand.php
  2. 8
      tests/MageTest/Command/AbstractCommandTest.php

6
Mage/Command/AbstractCommand.php

@ -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; return $output;
} }
} }

8
tests/MageTest/Command/AbstractCommandTest.php

@ -229,6 +229,14 @@ class AbstractCommandTest extends BaseTest
. " <green>mage example</green>\n" . " <green>mage example</green>\n"
. " * Runs the command with lights:\n" . " * Runs the command with lights:\n"
. " <green>mage example light</green>\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"
) )
); );
} }

Loading…
Cancel
Save