You are here

private static function PHPUnit_Util_Test::parseAnnotationContent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Util/Test.php \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()
PHPUnit_Util_Test::getExpectedException in vendor/phpunit/phpunit/src/Util/Test.php
Returns the expected exception for a test.

File

vendor/phpunit/phpunit/src/Util/Test.php, line 329

Class

PHPUnit_Util_Test
Test helpers.

Code

private static function parseAnnotationContent($message) {
  if (strpos($message, '::') !== false && count(explode('::', $message) == 2)) {
    if (defined($message)) {
      $message = constant($message);
    }
  }
  return $message;
}