Closed ostrolucky closed 5 years ago
Given following simple script
<?php use Symfony\Component\Console\Output\OutputInterface; require_once __DIR__.'/../vendor/autoload.php'; (new \Symfony\Component\Console\Application()) ->register('greeter') ->addArgument('message', null, 'world') ->setCode(function(\Symfony\Component\Console\Input\InputInterface $input, OutputInterface $output) { $output->writeln('hello ' . $input->getArgument('message')); }) ->getApplication() ->setDefaultCommand('greeter', true) ->run() ;
When phpcov executes it via phpcov execute greeter.php Then script should output hello, not
phpcov execute greeter.php
hello
Too many arguments, expected arguments "message".
Mistakenly I thought error comes from the application, but it comes from phpcov itself
Given following simple script
When phpcov executes it via
phpcov execute greeter.php
Then script should outputhello
, not