当前位置: 首页>>代码示例>>PHP>>正文


PHP PHP_CodeCoverage_Filter::addFilesToBlacklist方法代码示例

本文整理汇总了PHP中PHP_CodeCoverage_Filter::addFilesToBlacklist方法的典型用法代码示例。如果您正苦于以下问题:PHP PHP_CodeCoverage_Filter::addFilesToBlacklist方法的具体用法?PHP PHP_CodeCoverage_Filter::addFilesToBlacklist怎么用?PHP PHP_CodeCoverage_Filter::addFilesToBlacklist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHP_CodeCoverage_Filter的用法示例。


在下文中一共展示了PHP_CodeCoverage_Filter::addFilesToBlacklist方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * 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());
 }
开发者ID:proofek,项目名称:php-code-coverage,代码行数:40,代码来源:CodeCoverage.php

示例2: addFilesToBlacklist

 /**
  * Add files to the blacklist.
  *
  * @param array $files
  * @return $this
  */
 public function addFilesToBlacklist(array $files)
 {
     $this->filter->addFilesToBlacklist($files);
     return $this;
 }
开发者ID:peridot-php,项目名称:peridot-code-coverage-reporters,代码行数:11,代码来源:AbstractCodeCoverageReporter.php

示例3: dirname

<?php

/**
 * Flitch
 *
 * @link      http://github.com/DASPRiD/Flitch For the canonical source repository
 * @copyright 2011-2012 Ben Scholzen 'DASPRiD'
 * @license   http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
 */
// Set error reporting pretty high
error_reporting(E_ALL | E_STRICT);
// Get base, application and tests path
define('BASE_PATH', dirname(__DIR__));
define('TESTS_PATH', __DIR__);
// Define filters for clover report
$filter = new PHP_CodeCoverage_Filter();
$filter->addDirectoryToBlacklist(TESTS_PATH);
$filter->addDirectoryToBlacklist(BASE_PATH . '/bin');
$filter->addFilesToBlacklist(array(BASE_PATH . '/src/autoload_classmap.php', BASE_PATH . '/src/autoload_function.php', BASE_PATH . '/src/autoload_register.php'));
$filter->addDirectoryToWhitelist(BASE_PATH . '/src', '.php');
unset($filter);
// Load autoloader
require_once BASE_PATH . '/src/autoload_register.php';
开发者ID:dasprid,项目名称:flitch,代码行数:23,代码来源:bootstrap.php


注:本文中的PHP_CodeCoverage_Filter::addFilesToBlacklist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。