Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#234: add optional check for unexecuted covered or used code #413

Merged
merged 1 commit into from
Jan 3, 2016
Merged

#234: add optional check for unexecuted covered or used code #413

merged 1 commit into from
Jan 3, 2016

Conversation

sebastianheuer
Copy link
Contributor

Introduces an optional check that will throw a PHP_CodeCoverage_CoveredCodeNotExecutedException if code that is referenced in @covers or @uses is not executed.

The check can be activated by calling PHP_CodeCoverage::setCheckForUnexecutedCoveredCode(true).

Please have a look at the unit tests, as I am not exactly sure if they comply with the current test base,
PHP_CodeCoverageTest::testAppendThrowsExceptionIfCoveredCodeWasNotExecuted() and PHP_CodeCoverageTest::testAppendThrowsExceptionIfUsedCodeWasNotExecuted() in particular.

@sebastianheuer
Copy link
Contributor Author

This fixes #234

@sebastianbergmann sebastianbergmann merged commit 168eaf4 into sebastianbergmann:master Jan 3, 2016
/**
* Exception that is raised when covered code is not executed.
*
* @since Class available since Release 2.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is incorrect

@sebastianheuer sebastianheuer deleted the issue-234 branch January 3, 2016 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants