V
V
Vasily2014-07-25 11:38:59
symfony
Vasily, 2014-07-25 11:38:59

How to make Symfony2 project tests run in NetBeans?

The essence of the problem is as follows - tests are run through the command line, but only if you explicitly specify the config, that is:
phpunit -c acme.com\app\
and NetBeans says "No tests were performed"
here is a screen of phpunit settings
a15cb7fd5b5543ea837226380d7c7598.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-07-25
Protko @Fesor

1) don't use phpunit globally, install it as a dev dependency via composer. This is at least convenient.
2) check the paths to the configuration file. Something tells me what to write phpunit -c app. Or your project contains all available domains, which is somewhat strange.
3) for your own convenience, you can move phpunit.xml.dist to the root of the project, for this you will only need to slightly correct the paths in it.

D
dmitriy, 2014-07-25
@dmitriylanets

just try to specify the bootstrap file and run the tests, in the output window you can see whether the bootstrap is connected or not. The main purpose is to connect the kernel of the system to run tests.

F
faost, 2014-07-30
@faost

tests are run via the command line, but only if you explicitly specify the config

Everything is correct. If you do not want to specify the config - run directly from the config folder:
cd app/
phpunit

Regarding the settings - what do you have for the checkbox "Use bootstrap ..."?
In the config, only one field needs to be written: the path to /home/user/www/project/app/phpunit.xml.dist.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question