/** * Add option to `run` command configuration. * * @param BasicConsoleEvent $event */ public function onCommandConfigure(BasicConsoleEvent $event) { if ($event->getCommand()->getName() != 'run') { return; } $event->getCommand()->addOption('xdebug', null, InputOption::VALUE_OPTIONAL, 'Start Xdebug debugger on tests; use given IDE key. Default value is used only if empty option is passed.', 'phpstorm'); }
/** * @param Command $command * @param InputInterface $input * @param OutputInterface $output */ public function __construct(Command $command, InputInterface $input, OutputInterface $output) { parent::__construct($command); $this->input = $input; $this->output = $output; }
public function testShouldGetPropertiesPassedInConstructor() { $event = new BasicConsoleEvent($this->commandMock); $this->assertSame($this->commandMock, $event->getCommand()); }