I have chosen to use a
(phpunit-4.8.26.phar) to unit test my custom built PHP Framework and Application. The reason I am using the old stable release is because I need compatibility with
The reason I have chosen not to use
to get PHPUnit is because it's tends to pollute my
folder with dependencies. I like to keep it as lean as possible.
I am using
Windows 7 Pro SP1
and a whole bunch of other cool stuff to do my thing.
- I CAN run a passing unit test successfully from within PhpStorm.
- I CAN run a group of passing unit tests successfully from within PhpStorm.
- I CAN NOT run a FAILING unit test successfully from within PhpStorm.
- I CAN run a passing unit test successfully from the command line.
- I CAN run a group of passing unit test successfully from the command.
- I CAN NOT run a FAILING unit test successfully from the command line.
display a typical test failure message it exits with the below errors:
Warning: require(Composer\Autoload\ClassLoader.php): failed to open
stream: No such file or directory in
on line 23
Fatal error: require(): Failed opening required 'Composer\Autoload\ClassLoader.php'
on line 23
And a screen shot to expand on the above:
My directory structure:
My unit test script ('ConfigurationTest.php'):
My PHPUnit XML configuration file ('TestAll.xml'):
And lastly my Autoloader ('Autoloader.php'):
The error and warning indicate the inability to load the
file. What I don't understand is why it is asking for this file when I am using a
? Reading snippets off the internet indicate the Phar should have an internal autoloader though I am unable to see one.
I do not want to have to install
just to get it's autoloader. That would defeat the purpose of trying to solely use the Phar.
I added the
path to my Windows
but this did not make any difference. I understand that this should be done if PHPUnit was installed using
Any help on this 'hair pulling out matter' would be greatly appreciated...