1

I want to add acceptance tests to a command line application written in PHP. The PHPUnit tests are using proc_open to run the application, as suggested in PHP StdErr after Exec(), which works fine.

Nevertheless, the code coverage is not collected. A report is produced, showing 100% coverage for interfaces and empty classes, and 0% for everything else.

How can I get the code coverage for the CLI application with PHPUnit?

Community
  • 1
  • 1
nibra
  • 3,958
  • 2
  • 20
  • 34
  • Can you give us a minimal example of the code you are trying to cover? – Katie Oct 09 '16 at 18:25
  • In the end, we're talking about Symfony commands, that use application classes. If you want to have a closer look, you'll find them here: https://github.com/joomla-projects/joomla-pythagoras/tree/master/libraries/incubator/Cli/Command – nibra Oct 10 '16 at 10:47

0 Answers0