mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Tweaked custom command registration, Added StyleCI fixes
Old command registration method was interfering with default commands, causing only a limited subset of commands to show overall. This change follows the method the frameworks uses when loading in from a directory to prevent issues with run/load order.
This commit is contained in:
@ -210,7 +210,7 @@ class ThemeTest extends TestCase
|
||||
|
||||
public function test_register_command_allows_provided_command_to_be_usable_via_artisan()
|
||||
{
|
||||
Theme::registerCommand(new MyCustomCommand);
|
||||
Theme::registerCommand(new MyCustomCommand());
|
||||
|
||||
Artisan::call('bookstack:test-custom-command', []);
|
||||
$output = Artisan::output();
|
||||
@ -233,9 +233,12 @@ class ThemeTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
class MyCustomCommand extends Command {
|
||||
class MyCustomCommand extends Command
|
||||
{
|
||||
protected $signature = 'bookstack:test-custom-command';
|
||||
public function handle() {
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$this->line('Command ran!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user