diff --git a/src/commands/Command.php b/src/commands/SeacmsTest.php similarity index 73% rename from src/commands/Command.php rename to src/commands/SeacmsTest.php index fc3e633..935bbd6 100644 --- a/src/commands/Command.php +++ b/src/commands/SeacmsTest.php @@ -15,8 +15,22 @@ use Symfony\Component\Console\Output\OutputInterface; * Command to lauch tests from command line accross all seacms dependencies */ - class Command extends BaseCommand + class SeacmsTest extends BaseCommand { + /** + * @var string|null The default command name + */ + protected static $defaultName = 'seacms-test'; + + /** + * overwrite default __construct to be abel to receive array + * @param array|string|null $args + */ + public function __construct(string $name = null) + { + $name = is_string($args) ? $args : null; + parent::__construct($name); + } /** * set name @@ -30,8 +44,8 @@ use Symfony\Component\Console\Output\OutputInterface; // the full command description shown when running the command with // the "--help" option - ->setHelp("Test seacms via command line.\n". - "(Only if phpunit available)\n") + // ->setHelp("Test seacms via command line.\n". + // "(Only if phpunit available)\n") ->addOption('toto', '', InputOption::VALUE_NONE, 'Display toto text') ->addOption('text', 't', InputOption::VALUE_REQUIRED, 'Display the text') diff --git a/src/installer/Plugin.php b/src/installer/Plugin.php index b225ad8..abe1901 100644 --- a/src/installer/Plugin.php +++ b/src/installer/Plugin.php @@ -233,7 +233,7 @@ class Plugin extends ParentPlugin public function getCapabilities() { return [ - 'Composer\Plugin\Capability\CommandProvider' => 'Seacms\\Command\\Command', + 'Composer\Plugin\Capability\CommandProvider' => 'Seacms\\Command\\SeacmsTest', ]; } /* === implements EventsSubscriberInterface === */