protected function PHPUnit_Util_Configuration::toAbsolutePath

@since Method available since Release 3.5.0

Parameters

string $path:

boolean $useIncludePath:

Return value

string

7 calls to PHPUnit_Util_Configuration::toAbsolutePath()
PHPUnit_Util_Configuration::getListenerConfiguration in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php
Returns the configuration for listeners.
PHPUnit_Util_Configuration::getLoggingConfiguration in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php
Returns the logging configuration.
PHPUnit_Util_Configuration::getPHPConfiguration in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php
Returns the PHP configuration.
PHPUnit_Util_Configuration::getPHPUnitConfiguration in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php
Returns the PHPUnit configuration.
PHPUnit_Util_Configuration::getTestSuite in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php
@since Method available since Release 3.4.0

... See full list

File

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

Class

PHPUnit_Util_Configuration
Wrapper for the PHPUnit XML configuration file.

Code

protected function toAbsolutePath($path, $useIncludePath = FALSE) {

  // Check whether the path is already absolute.
  if ($path[0] === '/' || $path[0] === '\\' || strlen($path) > 3 && ctype_alpha($path[0]) && $path[1] === ':' && ($path[2] === '\\' || $path[2] === '/')) {
    return $path;
  }

  // Check whether a stream is used.
  if (strpos($path, '://') !== FALSE) {
    return $path;
  }
  $file = dirname($this->filename) . DIRECTORY_SEPARATOR . $path;
  if ($useIncludePath && !file_exists($file)) {
    $includePathFile = stream_resolve_include_path($path);
    if ($includePathFile) {
      $file = $includePathFile;
    }
  }
  return $file;
}