Answer the question
In order to leave comments, you need to log in
Trouble with the basics of unit testing?
Dear forum visitors, please help.
I just started learning the basics of unit testing in phpunit. In this regard, the following question arose: I have a userauth class that is located at the following path D:\work\GitHub\api\test\unit\Security\Authentication part of this class is covered by unit tests and part is not, my task is to check the percentage of coverage class tests. I do this, I go to the root of the project, the path is D:\work\GitHub\api, I call git bush in it, with it I go to the directory where the userauth class itself is located via the cd command, then I call $ phpunit --coverage-html in the class folder. /logs/report/ while the second parameter is the folder in which I want the report to be saved the path to the folder is the following d:/work/GitHub/api/logs/report/ with these parameters phpunit shows me help information about what commands are in phpunit , At the same time, the report files in the folder that I specify are not observed. What am I doing wrong tell me
Answer the question
In order to leave comments, you need to log in
First: you run the command phpunit --coverage-html PATH
in the folder with the class you are trying to test. This is not true. You need to run this command in the folder that contains the unit tests themselves.
Second: when
phpunit shows me help information about what commands are in phpunitAbove this text, the reason for the error is displayed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question