X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fconsolidation%2Fconfig%2Ftests%2Fsrc%2FMyFooCommand.php;fp=vendor%2Fconsolidation%2Fconfig%2Ftests%2Fsrc%2FMyFooCommand.php;h=0487a024a1e611426c47d3660d0280fc6831402b;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/consolidation/config/tests/src/MyFooCommand.php b/vendor/consolidation/config/tests/src/MyFooCommand.php new file mode 100644 index 000000000..0487a024a --- /dev/null +++ b/vendor/consolidation/config/tests/src/MyFooCommand.php @@ -0,0 +1,47 @@ +setName('my:foo') + ->setDescription('My foo command.') + ->setHelp('This command tests command option injection by echoing its options') + ->addOption( + 'other', + null, + InputOption::VALUE_REQUIRED, + 'Some other option', + 'fish' + ) + ->addOption( + 'name', + null, + InputOption::VALUE_REQUIRED, + 'What is the name of the thing we are naming', + 'George' + ) + ->addOption( + 'dir', + null, + InputOption::VALUE_REQUIRED, + 'What is the base directory to use for this command', + '/default/path' + ); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->writeln('Enter my:foo'); + $output->writeln('dir: ' . $input->getOption('dir')); + $output->writeln('name: ' . $input->getOption('name')); + $output->writeln('other: ' . $input->getOption('other')); + } +}