A
A
andriyan0v2016-08-02 11:12:52
symfony
andriyan0v, 2016-08-02 11:12:52

How to exclude directories by regular expression from code coverage in phpunit?

Good afternoon,
Tell me how to set up phpunit.xml to exclude some directories from Code coverage by regular expression.
The folders to be excluded are at different levels, so hardcoding the paths is not an option.
I do this, but they still get into the report

<phpunit ...>
    ....
    <filter>
        <whitelist>
            <directory>./../src/</directory>
            <exclude>
                <directory>./../src/*NeedToExclude/*</directory>
            </exclude>
        </whitelist>
    </filter>
    ....
<phpunit>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question