Skip to content

Commit

Permalink
Cleanup property and add more coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 24, 2024
1 parent be5f765 commit 49ec013
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Command/EntryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ class EntryCommand extends Command implements CommandCollectionAwareInterface
*/
protected CommandCollection $commands;

/**
* The HelpCommand to get help.
*
* @var \Cake\Console\Command\HelpCommand
*/
protected HelpCommand $help;

/**
* @inheritDoc
*/
Expand Down
13 changes: 13 additions & 0 deletions tests/TestCase/Command/EntryCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,17 @@ public function testExecuteHelp()
$this->assertOutputContains('migrations status');
$this->assertOutputContains('migrations rollback');
}

/**
* Test execute() generating help
*
* @return void
*/
public function testExecuteMissingCommand()
{
$this->exec('migrations derp');

$this->assertExitError();
$this->assertErrorContains('Could not find migrations command named `derp`');
}
}

0 comments on commit 49ec013

Please sign in to comment.