You are here

public function PHP_CodeCoverage_Driver_Xdebug::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php \PHP_CodeCoverage_Driver_Xdebug::__construct()

Constructor.

File

vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php, line 22

Class

PHP_CodeCoverage_Driver_Xdebug
Driver for Xdebug's code coverage functionality.

Code

public function __construct() {
  if (!extension_loaded('xdebug')) {
    throw new PHP_CodeCoverage_Exception('This driver requires Xdebug');
  }
  if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') && !ini_get('xdebug.coverage_enable')) {
    throw new PHP_CodeCoverage_Exception('xdebug.coverage_enable=On has to be set in php.ini');
  }
}