PHPUnit not doing anything, no output

后端 未结 1 1470
执念已碎
执念已碎 2021-01-24 12:14

I have written some test cases and want to try them out with PHPUnit. However, it does not work. If I run phpunit CategoryTest it outputs:

PHPUnit 3         


        
相关标签:
1条回答
  • 2021-01-24 12:43

    You shouldn't overwrite the __construct() method in your TestCase. The constructor sets up the mock generator and some other mandatory thing for the test, so you get a lot of strange behaviour and unwanted side effects if you overwrite the constructor. The setUp() method is the special method you should use to initialize your test.

    0 讨论(0)
提交回复
热议问题