protected static function PHPUnit_Util_Test::_parseAnnotationContent

Parse annotation content to use constant/class constant values

Constants are specified using a starting '@'. For example: @ClassName::CONST_NAME

If the constant is not found the string is used as is to ensure maximum BC.

Parameters

string $message:

Return value

string

1 call to PHPUnit_Util_Test::_parseAnnotationContent()

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Test.php, line 207

Class

PHPUnit_Util_Test
Test helpers.

Code

protected static function _parseAnnotationContent($message) {
  if (strpos($message, '::') !== FALSE && count(explode('::', $message) == 2)) {
    if (defined($message)) {
      $message = constant($message);
    }
  }
  return $message;
}