Is it possible to pack PHPUnit tests as PHAR and run them with phpunit?
I created php followed by a script:
<?php $cPhar = new Phar('mytests-archive.phar', 0); $cPhar->addFile('mytest.php'); $sStub = <<<ENDSTUB
But when I try to run the resulting archive as follows:
phpunit mytests-archive.phar
I get an error message:
#! /usr/bin/php PHPUnit 3.3.17 by Sebastian Bergmann. Class MyTestClass could not be found in /path/to/mytests-archive.phar
Does PHPUnit support PHAR files, or did I skip a step in my build script? (This is my first attempt to use PHAR)
source share