Exemple #1
0
 /**
  * @return array
  * @since  Method available since Release 3.6.0
  */
 public static function phpunitFiles()
 {
     if (self::$phpunitFiles === NULL) {
         self::$phpunitFiles = array_merge(phpunit_autoload(), phpunit_mockobject_autoload(), file_iterator_autoload(), php_codecoverage_autoload(), php_timer_autoload(), php_tokenstream_autoload(), text_template_autoload());
         if (function_exists('phpunit_dbunit_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, phpunit_dbunit_autoload());
         }
         if (function_exists('phpunit_selenium_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, phpunit_selenium_autoload());
         }
         if (function_exists('phpunit_story_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, phpunit_story_autoload());
         }
         if (function_exists('php_invoker_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, php_invoker_autoload());
         }
         self::$phpunitFiles = array_flip(self::$phpunitFiles);
     }
     return self::$phpunitFiles;
 }
 /**
  * @return array
  * @since  Method available since Release 3.6.0
  */
 public static function phpunitFiles()
 {
     if (self::$phpunitFiles === NULL) {
         self::$phpunitFiles = phpunit_autoload();
         if (function_exists('phpunit_mockobject_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, phpunit_mockobject_autoload());
         }
         if (function_exists('file_iterator_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, file_iterator_autoload());
         }
         if (function_exists('php_codecoverage_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, php_codecoverage_autoload());
         }
         if (function_exists('php_timer_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, php_timer_autoload());
         }
         if (function_exists('php_tokenstream_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, php_tokenstream_autoload());
         }
         if (function_exists('text_template_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, text_template_autoload());
         }
         if (function_exists('phpunit_dbunit_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, phpunit_dbunit_autoload());
         }
         if (function_exists('phpunit_selenium_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, phpunit_selenium_autoload());
         }
         if (function_exists('phpunit_story_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, phpunit_story_autoload());
         }
         if (function_exists('php_invoker_autoload')) {
             self::$phpunitFiles = array_merge(self::$phpunitFiles, php_invoker_autoload());
         }
         foreach (self::$phpunitFiles as $key => $value) {
             self::$phpunitFiles[$key] = str_replace('/', DIRECTORY_SEPARATOR, $value);
         }
         self::$phpunitFiles = array_flip(self::$phpunitFiles);
     }
     return self::$phpunitFiles;
 }
 /**
  * Constructor.
  *
  * @param  PHP_CodeCoverage_Driver $driver
  * @param  PHP_CodeCoverage_Filter $filter
  * @throws InvalidArgumentException
  */
 public function __construct(PHP_CodeCoverage_Driver $driver = NULL, PHP_CodeCoverage_Filter $filter = NULL)
 {
     if ($driver === NULL) {
         $driver = new PHP_CodeCoverage_Driver_Xdebug();
     }
     if ($filter === NULL) {
         $filter = new PHP_CodeCoverage_Filter();
     }
     $this->driver = $driver;
     $this->filter = $filter;
     // @codeCoverageIgnoreStart
     if (!defined('PHP_CODECOVERAGE_TESTSUITE')) {
         $this->filter->addFilesToBlacklist(php_codecoverage_autoload());
     }
     if (!defined('PHPUNIT_TESTSUITE')) {
         $this->filter->addFilesToBlacklist(phpunit_autoload());
         $this->filter->addFilesToBlacklist(phpunit_dbunit_autoload());
         $this->filter->addFilesToBlacklist(phpunit_mockobject_autoload());
         $this->filter->addFilesToBlacklist(phpunit_selenium_autoload());
         $this->filter->addFilesToBlacklist(phpunit_story_autoload());
     }
     if (!defined('FILE_ITERATOR_TESTSUITE')) {
         $this->filter->addFilesToBlacklist(file_iterator_autoload());
     }
     if (!defined('PHP_TIMER_TESTSUITE') && function_exists('php_timer_autoload')) {
         $this->filter->addFilesToBlacklist(php_timer_autoload());
     }
     if (!defined('PHP_TOKENSTREAM_TESTSUITE')) {
         $this->filter->addFilesToBlacklist(php_tokenstream_autoload());
     }
     // @codeCoverageIgnoreEnd
     $this->filter->addFilesToBlacklist(text_template_autoload());
 }