lundi 7 septembre 2015

How to execute phpunit in code with shell_exec

I'm trying to execute the shell command phpunit in laravel framework. So I can show the output in a nicer way within the CMS.

$results = shell_exec('phpunit');

.

$results = shell_exec('phpunit --json-log /path/to/store/file.log');

This does not work the output I get is the help from phpunit. I've tried to somehow set the full path, cause public/ is the document root. But no luck.

I've crashed my pc 2 times now with trying different things (some loop I guess).

Anyone that can help me with this problem?

Aucun commentaire:

Enregistrer un commentaire