Skip to content
Permalink
Browse files

Update a test to make sure the correct message is generated when an u…

…nknown shell option is being used
  • Loading branch information...
HavokInspiration committed Aug 1, 2017
1 parent 56c7294 commit 6e54f5706df37ce771a4f899071a2780e11ff605
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/Console/ConsoleOptionParser.php
  2. +2 −0 tests/TestCase/Console/ConsoleOptionParserTest.php
@@ -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);
@@ -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()

0 comments on commit 6e54f57

Please sign in to comment.
You can’t perform that action at this time.