PHPUnit - 'No tests executed' when using configuration file

后端 未结 22 687
故里飘歌
故里飘歌 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 realize this is super old, but it just happened to me too. Hopefully this will help someone.

    My problem was that I forgot the '@' symbol in /** @test */

    WRONG:

    /** test */
    function a_thread_can_be_deleted()
    {
        ...
    }
    

    RIGHT:

    /** @test */
    function a_thread_can_be_deleted()
    {
        ...
    }
    

提交回复
热议问题