I am trying to set some tests in symfony. I am doing the first steps on that. My question is from which folder should we write the phpunit -c app I mean in c:/ or from the bundle because I get the message of the not recognised internally command.
Asked
Active
Viewed 358 times
0
-
can anybody help me please. I still get the same problem. – hjfcb Hfhbv May 28 '13 at 07:59
1 Answers
0
You must run it from root direcory of your application. app
is just an argument which specify folder where phpunit.xml.dist
places.

Alexey B.
- 11,965
- 2
- 49
- 73
-
-
-
let me ask you if we should install something before begining testing with phpunit. I think everything is already installed. – hjfcb Hfhbv May 28 '13 at 08:21
-
You can specify folder that contain tests. Example you can run tests for one bundle `phpunit -c app src/A/BBundle/` or just one test `phpunit -c app src/A/BBundle/Tests/Controller/CControllerTest.php` – Alexey B. May 28 '13 at 09:45
-
I mean I don't know the directory from which we initiate the command. Is it the vendor directory, the app or what is it exactly? – hjfcb Hfhbv May 29 '13 at 07:31
-
You mean in my Symfony directory. There I get the problem of not recognised command when trying phpunit -c app – hjfcb Hfhbv May 29 '13 at 09:56
-
http://stackoverflow.com/questions/13764309/how-to-use-phpunit-installed-from-composer actually this answer resolved a part of the problem and when trying the same command in /vendor/bin I get this error message could not read app – hjfcb Hfhbv May 29 '13 at 10:02
-
I want to add also that I installed phpunit via the composer as a per project installation. – hjfcb Hfhbv May 29 '13 at 10:15
-
could not read "app" this is the error when I set the command from the vendor directory. – hjfcb Hfhbv May 29 '13 at 10:50
-
and when I set the command from the symfony directory I get the error of not recognised command internally and externally – hjfcb Hfhbv May 29 '13 at 10:52
-
could you help me please because when I want to run a particular test by writing this command vendor/bin>phpunit -c ../../app src/xxx/Bundle/tests/entity/yyy I get the error of could not read src/xxx/Bundle/tests/entity/yyy.php – hjfcb Hfhbv May 29 '13 at 21:25
-
-
Itried /vendor/bin>phpunit -c ../../src/xxx/Bundle/tests/entity/yyy.php and I get the following message : could not load c:\wamp\www\symfony\src/xxx/Bundle/tests/entity/yyy.php Parse PI : PI php never end ... Start ttag expected, '<' not found – hjfcb Hfhbv May 30 '13 at 04:12
-
when I deleted the option -c it get me with the message Runtime exception : unable to guess the kernel directory . is that fine ? – hjfcb Hfhbv May 30 '13 at 04:19
-
and when trying /vendor/bin>phpunit -c ../../src/xxx/Bundle/tests/entity/yyy and I get the following message : could not read "..\..\src/xxx/Bundle/tests/entity/yyy" – hjfcb Hfhbv May 30 '13 at 04:24