Пример #1
0
 public function testShouldNotAddXdebugOptionToDifferentCommand()
 {
     $renamedCommand = new RunCommand(new EventDispatcher());
     $renamedCommand->setName('foo-bar');
     // Save original options
     $optionsOriginal = $renamedCommand->getDefinition()->getOptions();
     // Trigger the event
     $this->listener->onCommandConfigure(new BasicConsoleEvent($renamedCommand));
     // The new options should be still the same, not altered
     $optionsNew = $renamedCommand->getDefinition()->getOptions();
     $this->assertSame($optionsOriginal, $optionsNew);
 }