public static function PHPUnit_Util_GlobalState::getIncludedFilesAsString

1 call to PHPUnit_Util_GlobalState::getIncludedFilesAsString()
PHPUnit_Framework_TestCase::run in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php
Runs the test case and collects the results in a TestResult object. If no TestResult object is passed a new one will be created.

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/GlobalState.php, line 190

Class

PHPUnit_Util_GlobalState
@package PHPUnit @subpackage Util @author Sebastian Bergmann <sebastian@phpunit.de> @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause…

Code

public static function getIncludedFilesAsString() {
  $blacklist = self::phpunitFiles();
  $files = get_included_files();
  $prefix = FALSE;
  $result = '';
  if (defined('__PHPUNIT_PHAR__')) {
    $prefix = 'phar://' . __PHPUNIT_PHAR__ . '/';
  }
  for ($i = count($files) - 1; $i > 0; $i--) {
    $file = $files[$i];
    if ($prefix !== FALSE) {
      $file = str_replace($prefix, '', $file);
    }
    if (!isset($blacklist[$file]) && is_file($file)) {
      $result = 'require_once \'' . $file . "';\n" . $result;
    }
  }
  return $result;
}