PHPUnit_Util_Filesystem::collectEnd PHP Method

collectEnd() public static method

Stops the collection of loaded files and returns the names of the loaded files.
public static collectEnd ( ) : array
return array
    public static function collectEnd()
    {
        return array_values(array_diff(get_included_files(), self::$buffer));
    }

Usage Example

Example #1
0
 /**
  * @param string $type      The type of concrete Log subclass to use.
  *                          Currently, valid values are 'console',
  *                          'syslog', 'sql', 'file', and 'mcal'.
  * @param string $name      The name of the actually log file, table, or
  *                          other specific store to use. Defaults to an
  *                          empty string, with which the subclass will
  *                          attempt to do something intelligent.
  * @param string $ident     The identity reported to the log system.
  * @param array  $conf      A hash containing any additional configuration
  *                          information that a subclass might need.
  * @param int $maxLevel     Maximum priority level at which to log.
  */
 public function __construct($type, $name = '', $ident = '', $conf = array(), $maxLevel = PEAR_LOG_DEBUG)
 {
     if (PHPUnit_Util_Filesystem::fileExistsInIncludePath('Log.php')) {
         PHPUnit_Util_Filesystem::collectStart();
         require_once 'Log.php';
         $this->log = Log::factory($type, $name, $ident, $conf, $maxLevel);
         foreach (PHPUnit_Util_Filesystem::collectEnd() as $blacklistedFile) {
             PHPUnit_Util_Filter::addFileToFilter($blacklistedFile, 'PHPUNIT');
         }
     } else {
         throw new RuntimeException('Log is not available.');
     }
 }
All Usage Examples Of PHPUnit_Util_Filesystem::collectEnd