本文整理匯總了PHP中PHPUnit_Util_Blacklist::directories方法的典型用法代碼示例。如果您正苦於以下問題:PHP PHPUnit_Util_Blacklist::directories方法的具體用法?PHP PHPUnit_Util_Blacklist::directories怎麽用?PHP PHPUnit_Util_Blacklist::directories使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PHPUnit_Util_Blacklist
的用法示例。
在下文中一共展示了PHPUnit_Util_Blacklist::directories方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initialize
private function initialize()
{
if (self::$directories === null) {
self::$directories = array();
foreach (self::$blacklistedClassNames as $className => $parent) {
if (!class_exists($className)) {
continue;
}
$reflector = new ReflectionClass($className);
$directory = $reflector->getFileName();
for ($i = 0; $i < $parent; $i++) {
$directory = dirname($directory);
}
self::$directories[] = $directory;
}
// Hide process isolation workaround on Windows.
// @see PHPUnit_Util_PHP::factory()
// @see PHPUnit_Util_PHP_Windows::process()
if (DIRECTORY_SEPARATOR === '\\') {
// tempnam() prefix is limited to first 3 chars.
// @see http://php.net/manual/en/function.tempnam.php
self::$directories[] = sys_get_temp_dir() . '\\PHP';
}
}
}
示例2: initialize
private function initialize()
{
if (self::$directories === null) {
self::$directories = array();
foreach (PHP_CodeCoverage_Filter::$blacklistClassNames as $className => $parent) {
if (!class_exists($className)) {
continue;
}
$reflector = new ReflectionClass($className);
$directory = $reflector->getFileName();
for ($i = 0; $i < $parent; $i++) {
$directory = dirname($directory);
}
self::$directories[] = $directory;
}
}
}