Skip to content
Permalink
Browse files

Include AppShell when scanning application for shells/commands.

Refs #12153
  • Loading branch information...
markstory committed May 30, 2018
1 parent cfaa31c commit bdf8ffcbcd96d240e47d067aac5c64eb8e24b522
Showing with 4 additions and 2 deletions.
  1. +2 −2 src/Console/CommandScanner.php
  2. +2 −0 tests/TestCase/Console/CommandCollectionTest.php
@@ -64,13 +64,13 @@ public function scanApp()
App::path('Shell')[0],
$appNamespace . '\Shell\\',
'',
['app']
[]
);
$appCommands = $this->scanDir(
App::path('Command')[0],
$appNamespace . '\Command\\',
'',
['app']
[]
);
return array_merge($appShells, $appCommands);
@@ -204,11 +204,13 @@ public function testAutoDiscoverApp()
$collection = new CommandCollection();
$collection->addMany($collection->autoDiscover());
$this->assertTrue($collection->has('app'));
$this->assertTrue($collection->has('demo'));
$this->assertTrue($collection->has('i18m'));
$this->assertTrue($collection->has('sample'));
$this->assertTrue($collection->has('testing_dispatch'));
$this->assertSame('TestApp\Shell\AppShell', $collection->get('app'));
$this->assertSame('TestApp\Command\DemoCommand', $collection->get('demo'));
$this->assertSame('TestApp\Shell\I18mShell', $collection->get('i18m'));
$this->assertSame('TestApp\Shell\SampleShell', $collection->get('sample'));

0 comments on commit bdf8ffc

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