public function PHPUnit_Util_Configuration::getLoggingConfiguration

Returns the logging configuration.

Return value

array

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php, line 391

Class

PHPUnit_Util_Configuration
Wrapper for the PHPUnit XML configuration file.

Code

public function getLoggingConfiguration() {
  $result = array();
  foreach ($this->xpath
    ->query('logging/log') as $log) {
    $type = (string) $log
      ->getAttribute('type');
    $target = $this
      ->toAbsolutePath((string) $log
      ->getAttribute('target'));
    if ($type == 'coverage-html') {
      if ($log
        ->hasAttribute('title')) {
        $result['title'] = (string) $log
          ->getAttribute('title');
      }
      if ($log
        ->hasAttribute('charset')) {
        $result['charset'] = (string) $log
          ->getAttribute('charset');
      }
      if ($log
        ->hasAttribute('lowUpperBound')) {
        $result['lowUpperBound'] = (string) $log
          ->getAttribute('lowUpperBound');
      }
      if ($log
        ->hasAttribute('highLowerBound')) {
        $result['highLowerBound'] = (string) $log
          ->getAttribute('highLowerBound');
      }
      if ($log
        ->hasAttribute('highlight')) {
        $result['highlight'] = $this
          ->getBoolean((string) $log
          ->getAttribute('highlight'), FALSE);
      }
    }
    else {
      if ($type == 'junit') {
        if ($log
          ->hasAttribute('logIncompleteSkipped')) {
          $result['logIncompleteSkipped'] = $this
            ->getBoolean((string) $log
            ->getAttribute('logIncompleteSkipped'), FALSE);
        }
      }
      else {
        if ($type == 'coverage-text') {
          if ($log
            ->hasAttribute('showUncoveredFiles')) {
            $result['coverageTextShowUncoveredFiles'] = $this
              ->getBoolean((string) $log
              ->getAttribute('showUncoveredFiles'), FALSE);
          }
        }
      }
    }
    $result[$type] = $target;
  }
  return $result;
}