2
votes

I created a new symfony 2.4 project and would like to run the test suite on core and bundles just to know phpunit is installed properly and to see the outputs, but can't figure out what am I doing wrong
I installed phpunit via composer
Now there is a link to phpunit bin/phpunit
I try bin/phpunit -c vendor/symfony/symfony/
get some errors with missing /vendor/symfony/symfony/vendor/autoload.php and errors in autoload.php.dist
I'm totally new to phpunit, what do I need to do to run those tests and to install phpunit properly?

1

1 Answers

3
votes

To run phpunit the core, you have to navigate to the package (vendor/symfony/symfony), then you have to install all packages (composer install) and finally you have to execute phpunit.

All in all way to difficult to test of phpunit works. Some other, much simpler, suggestions:

  1. Execute phpunit --version. If you see the version, it's installed correctly
  2. Ececute phpunit -c app (the command you will execute when executing your tests). This will run the 2 tests from the acmedemobundle
  3. If you see the error message about the vendor directory, you know phpunit works as it executed the correct bootstrap file