M
M
michaelromanov902018-06-11 09:22:14
phpstorm
michaelromanov90, 2018-06-11 09:22:14

How to run phpunit via phpStorm?

here is what I see when I run the test from the openServer console
5b1e13db74f9a493625826.jpeg
and here (and this is the problem) what I see when I run it from phpStorm
5b1e141698b26138782345.jpeg
with other slashes - the same trouble
5b1e145d9dd2e071748500.jpeg
At the same time php and composer are (globally) connected
5b1e14d88f346599746551.jpeg
Please tell me what case?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ksnk, 2018-06-11
@michaelromanov90

file>settings>Languages&Frameworks>php>TestFrameworks or just type phpunit in the settings search box.
Specify where the required phar is located.
I usually write in composer.json

"require-dev": {
        "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0"
    },
after which everything becomes where it should be and by itself. Although this is how each project has its own phpunit;) Do not beat the numbers - it was pulled from somewhere without looking ...

M
michaelromanov90, 2018-06-12
@michaelromanov90

Despite the correctness of specifying all the parameters, the desired command works only through specifying the interpreter and phpunit itself.
However, if you do not enter this command, but use the alternative - right-click on the appropriate directory in ide -> run test, everything works fine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question