private static function PHPUnit_Util_Test::getBooleanAnnotationSetting

@since Method available since Release 3.4.0

Parameters

string $className:

string $methodName:

string $settingName:

Return value

boolean

4 calls to PHPUnit_Util_Test::getBooleanAnnotationSetting()
PHPUnit_Util_Test::getBackupSettings in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Test.php
Returns the backup settings for a test.
PHPUnit_Util_Test::getErrorHandlerSettings in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Test.php
Returns the error handler settings for a test.
PHPUnit_Util_Test::getOutputBufferingSettings in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Test.php
Returns the output buffering settings for a test.
PHPUnit_Util_Test::getPreserveGlobalStateSettings in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Test.php
Returns the preserve global state settings for a test.

File

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

Class

PHPUnit_Util_Test
Test helpers.

Code

private static function getBooleanAnnotationSetting($className, $methodName, $settingName) {
  $annotations = self::parseTestMethodAnnotations($className, $methodName);
  $result = NULL;
  if (isset($annotations['class'][$settingName])) {
    if ($annotations['class'][$settingName][0] == 'enabled') {
      $result = TRUE;
    }
    else {
      if ($annotations['class'][$settingName][0] == 'disabled') {
        $result = FALSE;
      }
    }
  }
  if (isset($annotations['method'][$settingName])) {
    if ($annotations['method'][$settingName][0] == 'enabled') {
      $result = TRUE;
    }
    else {
      if ($annotations['method'][$settingName][0] == 'disabled') {
        $result = FALSE;
      }
    }
  }
  return $result;
}