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\UtilCode
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;
}