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

Breadcrumb

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

function PhptTestCase::settings

@psalm-return list<string>

2 calls to PhptTestCase::settings()
PhptTestCase::run in vendor/phpunit/phpunit/src/Runner/PhptTestCase.php
Runs a test and collects its result in a TestResult instance.
PhptTestCase::runClean in vendor/phpunit/phpunit/src/Runner/PhptTestCase.php

File

vendor/phpunit/phpunit/src/Runner/PhptTestCase.php, line 809

Class

PhptTestCase
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Runner

Code

private function settings(bool $collectCoverage) : array {
    $settings = [
        'allow_url_fopen=1',
        'auto_append_file=',
        'auto_prepend_file=',
        'disable_functions=',
        'display_errors=1',
        'docref_ext=.html',
        'docref_root=',
        'error_append_string=',
        'error_prepend_string=',
        'error_reporting=-1',
        'html_errors=0',
        'log_errors=0',
        'open_basedir=',
        'output_buffering=Off',
        'output_handler=',
        'report_memleaks=0',
        'report_zend_debug=0',
    ];
    if (extension_loaded('pcov')) {
        if ($collectCoverage) {
            $settings[] = 'pcov.enabled=1';
        }
        else {
            $settings[] = 'pcov.enabled=0';
        }
    }
    if (extension_loaded('xdebug')) {
        if ($collectCoverage) {
            $settings[] = 'xdebug.mode=coverage';
        }
        else {
            $settings[] = 'xdebug.mode=off';
        }
    }
    return $settings;
}
RSS feed
Powered by Drupal