/** * @param ContainerAwareCommand $command A ContainerAwareCommand instance to test * @param ContainerInterface $container The container to be injected in the command to test */ public function __construct(ContainerAwareCommand $command, ContainerInterface $container) { $application = new Application('Paraunit Command Test: ' . $command->getName()); $application->add($command); $this->container = $container; $command->setContainer($container); parent::__construct($command); }
/** * Constructor. * * @param Command $command A Command instance to test. */ public function __construct(ContainerInterface $container, Command $command) { $this->container = $container; $this->theCommand = $command; parent::__construct($command); }