default.phpt 580 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Single Application can be executed
  3. --FILE--
  4. <?php
  5. use Symfony\Component\Console\Input\InputInterface;
  6. use Symfony\Component\Console\Output\OutputInterface;
  7. use Symfony\Component\Console\SingleCommandApplication;
  8. $vendor = __DIR__;
  9. while (!file_exists($vendor.'/vendor')) {
  10. $vendor = dirname($vendor);
  11. }
  12. require $vendor.'/vendor/autoload.php';
  13. (new SingleCommandApplication())
  14. ->setCode(function (InputInterface $input, OutputInterface $output): int {
  15. $output->writeln('Hello World!');
  16. return 0;
  17. })
  18. ->run()
  19. ;
  20. ?>
  21. --EXPECT--
  22. Hello World!