0
votes

I have installed symfony2 using composer. The welcome page runs, the demo app runs and I can test the demo app using phpunit ok.

However, I cannot test symfony using phpunit; the directory structure seems to be messed up somehow.

The installation was as follows:

php composer.phar create-project symfony/framework-standard-edition path/ 2.1.2

It creates directories as follows:

app/ and vendor/symfony/symfony/

BUT

phpunit then tries to follow this path:

path/vendor/symfony/symfony/vendor/autoload.php

and there is no "vendor" directory structure under symphony.

Did I do something wrong?

1
Can you supply your phpunit config file? - james_tookey
Is there a reason why you are trying to run the unit tests that ship with the framework? - Gerry
james_tookey - which config file do you want? - andym2009
Gerry - purely to check I am able to test everything if I need to do so later. - andym2009

1 Answers

1
votes

If you want to run the unit tests shipped in a third-party package, you should not try to run those from inside the vendor directory of a Symfony project, but separately clone their repository and do a composer install in their directory, after which you should be able to run the provided test suite.

For example you can clone [email protected]:symfony/symfony.git, run composer install in your cloned directory, and then run phpunit for the provided test suite.

This really is only useful if you want to contribute to those libraries.