PHPUnit - 'No tests executed' when using configuration file

后端 未结 22 954
故里飘歌
故里飘歌 2021-01-31 00:47

The Problem

To improve my quality of code, I\'ve decided to try to learn how to test my code using Unit Testing instead of my mediocre-at-best testing solutions.

22条回答
  •  甜味超标
    2021-01-31 01:34

    I had the issue of no tests being executed, even when things were set up fine.

    The cause was the namespace was not the first command of the file, it was after some doc-block comments.

    reverting caused phpunit to see the tests and run correctly.

提交回复
热议问题