public function PHPUnit_Util_Configuration::getPHPConfiguration

Returns the PHP configuration.

@since Method available since Release 3.2.1

Return value

array

1 call to PHPUnit_Util_Configuration::getPHPConfiguration()
PHPUnit_Util_Configuration::handlePHPConfiguration in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php
Handles the PHP configuration.

File

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

Class

PHPUnit_Util_Configuration
Wrapper for the PHPUnit XML configuration file.

Code

public function getPHPConfiguration() {
  $result = array(
    'include_path' => array(),
    'ini' => array(),
    'const' => array(),
    'var' => array(),
    'env' => array(),
    'post' => array(),
    'get' => array(),
    'cookie' => array(),
    'server' => array(),
    'files' => array(),
    'request' => array(),
  );
  foreach ($this->xpath
    ->query('php/includePath') as $includePath) {
    $path = (string) $includePath->nodeValue;
    $result['include_path'][] = $this
      ->toAbsolutePath($path);
  }
  foreach ($this->xpath
    ->query('php/ini') as $ini) {
    $name = (string) $ini
      ->getAttribute('name');
    $value = (string) $ini
      ->getAttribute('value');
    $result['ini'][$name] = $value;
  }
  foreach ($this->xpath
    ->query('php/const') as $const) {
    $name = (string) $const
      ->getAttribute('name');
    $value = (string) $const
      ->getAttribute('value');
    $result['const'][$name] = $this
      ->getBoolean($value, $value);
  }
  foreach (array(
    'var',
    'env',
    'post',
    'get',
    'cookie',
    'server',
    'files',
    'request',
  ) as $array) {
    foreach ($this->xpath
      ->query('php/' . $array) as $var) {
      $name = (string) $var
        ->getAttribute('name');
      $value = (string) $var
        ->getAttribute('value');
      $result[$array][$name] = $this
        ->getBoolean($value, $value);
    }
  }
  return $result;
}