diff --git a/templates/bake/Command/command.twig b/templates/bake/Command/command.twig index 7c376d59..88561f5f 100644 --- a/templates/bake/Command/command.twig +++ b/templates/bake/Command/command.twig @@ -33,7 +33,7 @@ class {{ name }}Command extends Command * * @var string */ - protected string $name = '{{ command_name }}'; + protected string $name = 'cake {{ command_name }}'; /** * Get the command description. diff --git a/tests/TestCase/Command/CommandCommandTest.php b/tests/TestCase/Command/CommandCommandTest.php index 4a21c6e0..65e7f8ab 100644 --- a/tests/TestCase/Command/CommandCommandTest.php +++ b/tests/TestCase/Command/CommandCommandTest.php @@ -53,6 +53,7 @@ public function testMain(): void $this->assertExitCode(CommandInterface::CODE_SUCCESS); $this->assertFilesExist($this->generatedFiles); $this->assertFileContains('class ExampleCommand extends Command', $this->generatedFiles[0]); + $this->assertFileContains("protected string \$name = 'cake example'", $this->generatedFiles[0]); } /** diff --git a/tests/comparisons/Command/testBakePlugin.php b/tests/comparisons/Command/testBakePlugin.php index 6abb4d67..3fe9be10 100644 --- a/tests/comparisons/Command/testBakePlugin.php +++ b/tests/comparisons/Command/testBakePlugin.php @@ -18,7 +18,7 @@ class ExampleCommand extends Command * * @var string */ - protected string $name = 'test_bake example'; + protected string $name = 'cake test_bake example'; /** * Get the command description.