PHPUnit - 'No tests executed' when using configuration file

后端 未结 22 690
故里飘歌
故里飘歌 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:38

    Check phpunit.xml file, look inside testsuites.

    My version of phpunit (2019) is looking for files ending (suffix) *Test.php . So, make sure all the test files are named properly (ex.: BookTest.php is correct, BookTests.php is not, BookTestCase.php is not).

提交回复
热议问题