6

I use PHPUnit to test my projects, using a phpunit.xml.dist config file.

The default configuration for all my projects is set to generate html code coverage reports.

Is there anyway I can run the phpunit command at a given time without generating the code coverage reports without having to change the config file?

This would be something like a --no-coverage option.

1

2 Answers 2

7

As noted by Gonçalo Queirós in this answer, the --no-coverage option is supported since version 4.8.

Sign up to request clarification or add additional context in comments.

Comments

5

I couldn't find anything from the documentation to reference any sort of functionality that would provide the option to be a toggle.

You could point PHPunit to a second phpunit.xml that doesn't have the code coverage

You can see this very question being asked prior.

Is there a way to disable code coverage in PHPUnit for a single test?

1 Comment

Turns out this is really the only way to go. Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.