Force Exclude files from PHPUnit Code Coverage

前端 未结 5 2063
北恋
北恋 2021-02-19 10:31

Is it possible to forcefully exclude a folder from PHPUnit\'s code coverage?

Problem I\'ve got is, that I have a Symfony 1.4 project, which has folders at ./lib/ve

5条回答
  •  孤城傲影
    2021-02-19 10:43

    The correct way to exclude certain files from the coverage report in more or less recent versions of PHPUnit is to use directive instead of . E.g.:

    
        
            src/
            
                src/Legacy/
                src/example.php
            
        
    
    

提交回复
热议问题