Mark a PHPUnit test class as to be ignored

前端 未结 3 1844
鱼传尺愫
鱼传尺愫 2020-12-18 19:35

I have written an abstract test case class that is to be extended by concrete test case classes.

It extends from the PHPUnit_TestCase.

Is th

3条回答
  •  Happy的楠姐
    2020-12-18 20:26

    Assuming you want to exclude the file name TestCase.php. As in my case I use this class as an abstract to all my test classes which itself extends PHPUnit_Framework_TestCase.

    Solution: add this to your phpunit.xml

    
        
            ./tests
            ./tests/TestCase.php
        
    
    

    My TestCase.php example:

提交回复
热议问题