File
- drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/GlobalState.php, line 216
Class
- PHPUnit_Util_GlobalState
- @package PHPUnit
@subpackage Util
@author Sebastian Bergmann <sebastian@phpunit.de>
@copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
@license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause…
Code
public static function getConstantsAsString() {
$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;
}