fix(Command): rename it to prevent errors with default name command
This commit is contained in:
parent
817ba4501d
commit
eb547ef962
@ -15,8 +15,22 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
* Command to lauch tests from command line accross all seacms dependencies
|
* 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
|
* set name
|
||||||
@ -30,8 +44,8 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
|
|
||||||
// the full command description shown when running the command with
|
// the full command description shown when running the command with
|
||||||
// the "--help" option
|
// the "--help" option
|
||||||
->setHelp("Test seacms via command line.\n".
|
// ->setHelp("Test seacms via command line.\n".
|
||||||
"(Only if phpunit available)\n")
|
// "(Only if phpunit available)\n")
|
||||||
|
|
||||||
->addOption('toto', '', InputOption::VALUE_NONE, 'Display toto text')
|
->addOption('toto', '', InputOption::VALUE_NONE, 'Display toto text')
|
||||||
->addOption('text', 't', InputOption::VALUE_REQUIRED, 'Display the text')
|
->addOption('text', 't', InputOption::VALUE_REQUIRED, 'Display the text')
|
@ -233,7 +233,7 @@ class Plugin extends ParentPlugin
|
|||||||
public function getCapabilities()
|
public function getCapabilities()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'Composer\Plugin\Capability\CommandProvider' => 'Seacms\\Command\\Command',
|
'Composer\Plugin\Capability\CommandProvider' => 'Seacms\\Command\\SeacmsTest',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
/* === implements EventsSubscriberInterface === */
|
/* === implements EventsSubscriberInterface === */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user