Add Shell::$plugin and update getOptionParser()

Adding a plugin property allows the correct
usage/help information to be generated.

Fixes #2359
This commit is contained in:
mark_story 2011-12-10 21:31:21 -05:00
parent 47b2f3e70c
commit 205bfb506f
4 changed files with 26 additions and 1 deletions

View file

@ -422,6 +422,8 @@ class ShellDispatcherTest extends CakeTestCase {
$Dispatcher = new TestShellDispatcher();
$result = $Dispatcher->getShell('test_plugin.example');
$this->assertInstanceOf('ExampleShell', $result);
$this->assertEquals('TestPlugin', $result->plugin);
$this->assertEquals('Example', $result->name);
$Dispatcher = new TestShellDispatcher();
$result = $Dispatcher->getShell('TestPlugin.example');