示例#1
0
 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';
         }
     }
 }
 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;
         }
     }
 }