public static function PHPUnit_Util_GlobalState::processIncludedFilesAsString in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Util/GlobalState.php \PHPUnit_Util_GlobalState::processIncludedFilesAsString()
2 calls to PHPUnit_Util_GlobalState::processIncludedFilesAsString()
- PHPUnit_Util_GlobalState::getIncludedFilesAsString in vendor/
phpunit/ phpunit/ src/ Util/ GlobalState.php - Util_GlobalStateTest::testIncludedFilesAsStringSkipsVfsProtocols in vendor/
phpunit/ phpunit/ tests/ Util/ GlobalStateTest.php - @covers PHPUnit_Util_GlobalState::processIncludedFilesAsString
File
- vendor/
phpunit/ phpunit/ src/ Util/ GlobalState.php, line 46
Class
- PHPUnit_Util_GlobalState
- @since Class available since Release 3.4.0
Code
public static function processIncludedFilesAsString(array $files) {
$blacklist = new PHPUnit_Util_Blacklist();
$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 && strpos($file, $prefix) === 0) {
continue;
}
// Skip virtual file system protocols
if (preg_match('/^(vfs|phpvfs[a-z0-9]+):/', $file)) {
continue;
}
if (!$blacklist
->isBlacklisted($file) && is_file($file)) {
$result = 'require_once \'' . $file . "';\n" . $result;
}
}
return $result;
}