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

Breadcrumb

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

function GlobalState::getConstantsAsString

1 call to GlobalState::getConstantsAsString()
TestRunner::runInSeparateProcess in vendor/phpunit/phpunit/src/Framework/TestRunner.php

File

vendor/phpunit/phpunit/src/Util/GlobalState.php, line 200

Class

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

Namespace

PHPUnit\Util

Code

public static function getConstantsAsString() : string {
    $constants = get_defined_constants(true);
    $result = '';
    if (isset($constants['user'])) {
        foreach ($constants['user'] as $name => $value) {
            $result .= sprintf('if (!defined(\'%s\')) define(\'%s\', %s);' . "\n", $name, $name, self::exportVariable($value));
        }
    }
    return $result;
}
RSS feed
Powered by Drupal