Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 24, 2011
1 parent 487a700 commit 7f4676b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions PHP/CodeCoverage/Driver/Xdebug.php
Expand Up @@ -43,11 +43,6 @@
* @since File available since Release 1.0.0
*/

if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') &&
!ini_get('xdebug.coverage_enable')) {
die("You need to set xdebug.coverage_enable=On in your php.ini.\n");
}

/**
* Driver for Xdebug's code coverage functionality.
*
Expand All @@ -63,6 +58,19 @@
*/
class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver
{
/**
* Constructor.
*/
public function __construct()
{
if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') &&
!ini_get('xdebug.coverage_enable')) {
throw new PHP_CodeCoverage_Exception(
'You need to set xdebug.coverage_enable=On in your php.ini.'
);
}
}

/**
* Start collection of code coverage information.
*/
Expand Down

0 comments on commit 7f4676b

Please sign in to comment.