Skip to content

Commit

Permalink
Update a test to make sure the correct message is generated when an u…
Browse files Browse the repository at this point in the history
…nknown shell option is being used
  • Loading branch information
HavokInspiration committed Aug 1, 2017
1 parent 56c7294 commit 6e54f57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/ConsoleOptionParser.php
Expand Up @@ -825,7 +825,7 @@ public function getCommandError($command)
* @param string $option Unknown option name trying to be used.
* @return string The message to be displayed in the console.
*/
public function getOptionError($option)
protected function getOptionError($option)
{
$availableOptions = array_keys($this->_options);
$bestGuess = $this->findClosestItem($option, $availableOptions);
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/Console/ConsoleOptionParserTest.php
Expand Up @@ -359,6 +359,8 @@ public function testOptionWithBooleanParam()
* test parsing options that do not exist.
*
* @expectedException \Cake\Console\Exception\ConsoleException
* @expectedExceptionMessageRegexp /Unknown option `fail`.\n\nDid you mean `help` \?\n\nAvailable options are :\n\n
* - help\n - no-commit/
* @return void
*/
public function testOptionThatDoesNotExist()
Expand Down

0 comments on commit 6e54f57

Please sign in to comment.