whatthejeff / nyancat-phpunit-resultprinter

Nyan Cat result printer for PHPUnit
MIT License
284 stars 23 forks source link

Doesn't work with system-installed PHPUnit (without extra config). #6

Closed Drarok closed 10 years ago

Drarok commented 10 years ago

Following the instructions in the README don't actually work, since the Composer autoloader is never included.

PHP Fatal error:  Class 'NyanCat\Scoreboard' not found in …/vendor/whatthejeff/nyancat-phpunit-resultprinter/src/NyanCat/PHPUnit/ResultPrinter.php on line 45
Drarok commented 10 years ago

I think all it needs extra is the following added to phpunit.xml:

bootstrap="vendor/autoload.php"
whatthejeff commented 10 years ago

I think the instructions assume you have installed PHPUnit via composer. I can add a note for other install methods.

Thanks :)

Drarok commented 10 years ago

I was running a composer-installed phpunit - it doesn't seem to add the autoloader anywhere though?

I did indeed manage to get it running with the autoloader passed in as bootstrap.

whatthejeff commented 10 years ago

Are you sure you're running the PHPUnit binary that composer installs?

Drarok commented 10 years ago

I thought I was, but was actually running the system-installed version. Sorry, my bad!

whatthejeff commented 10 years ago

No worries. Thanks for the heads up :)