Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. XdebugDriver.php

function XdebugDriver::ensureXdebugCodeCoverageFeatureIsEnabled

Throws

XdebugNotEnabledException

1 call to XdebugDriver::ensureXdebugCodeCoverageFeatureIsEnabled()
XdebugDriver::__construct in vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php

File

vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php, line 141

Class

XdebugDriver
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage

Namespace

SebastianBergmann\CodeCoverage\Driver

Code

private function ensureXdebugCodeCoverageFeatureIsEnabled() : void {
    if (version_compare(phpversion('xdebug'), '3.1', '>=')) {
        if (!in_array('coverage', xdebug_info('mode'), true)) {
            throw new XdebugNotEnabledException();
        }
        return;
    }
    $mode = getenv('XDEBUG_MODE');
    if ($mode === false || $mode === '') {
        $mode = ini_get('xdebug.mode');
    }
    if ($mode === false || !in_array('coverage', explode(',', $mode), true)) {
        throw new XdebugNotEnabledException();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal