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


PHP PHPUnit_Util_Filter::addFileToWhitelist方法代码示例

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


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

示例1: whitelist

 public static function whitelist()
 {
     $folders = Kohana::config('phpunit.whitelist_folders');
     foreach ($folders as $folder) {
         $files = Kohana::list_files($folder, TRUE);
         foreach ($files as $file) {
             if (is_file($file)) {
                 if ($file == __FILE__) {
                     continue;
                 } else {
                     PHPUnit_Util_Filter::addFileToWhitelist($file);
                 }
             }
         }
     }
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:16,代码来源:Tests.php

示例2: suite

 public static function suite()
 {
     PHPUnit_Util_Filter::addDirectoryToWhitelist(DWOO_DIRECTORY . 'plugins/builtin');
     PHPUnit_Util_Filter::addDirectoryToWhitelist(DWOO_DIRECTORY . 'Dwoo');
     PHPUnit_Util_Filter::addFileToWhitelist(DWOO_DIRECTORY . 'Dwoo.php');
     PHPUnit_Util_Filter::removeDirectoryFromWhitelist(DWOO_DIRECTORY . 'Dwoo/Adapters');
     $suite = new self('Dwoo - Unit Tests Report');
     foreach (new DirectoryIterator(dirname(__FILE__)) as $file) {
         if (!$file->isDot() && !$file->isDir() && (string) $file !== 'DwooTests.php' && substr((string) $file, -4) === '.php') {
             require_once $file->getPathname();
             $class = basename($file, '.php');
             // to have an optional test suite, it should implement a public static function isRunnable
             // that returns true only if all the conditions are met to run it successfully, for example
             // it can check that an external library is present
             if (!method_exists($file, 'isRunnable') || call_user_func(array($file, 'isRunnable'))) {
                 $suite->addTestSuite($class);
             }
         }
     }
     return $suite;
 }
开发者ID:apeschar,项目名称:php-fw,代码行数:21,代码来源:DwooTests.php

示例3: handleConfiguration

 /**
  * @param  array $arguments
  * @since  Method available since Release 3.2.1
  */
 protected function handleConfiguration(array &$arguments)
 {
     if (isset($arguments['configuration'])) {
         $arguments['configuration'] = new PHPUnit_Util_Configuration($arguments['configuration']);
         $arguments['pmd'] = $arguments['configuration']->getPMDConfiguration();
     } else {
         $arguments['pmd'] = array();
     }
     $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : FALSE;
     $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array();
     $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : FALSE;
     $arguments['testDatabasePrefix'] = isset($arguments['testDatabasePrefix']) ? $arguments['testDatabasePrefix'] : '';
     $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : FALSE;
     $arguments['wait'] = isset($arguments['wait']) ? $arguments['wait'] : FALSE;
     if (isset($arguments['configuration'])) {
         $arguments['configuration']->handlePHPConfiguration();
         $filterConfiguration = $arguments['configuration']->getFilterConfiguration();
         PHPUnit_Util_Filter::$addUncoveredFilesFromWhitelist = $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist'];
         foreach ($filterConfiguration['blacklist']['include']['directory'] as $dir) {
             PHPUnit_Util_Filter::addDirectoryToFilter($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['blacklist']['include']['file'] as $file) {
             PHPUnit_Util_Filter::addFileToFilter($file);
         }
         foreach ($filterConfiguration['blacklist']['exclude']['directory'] as $dir) {
             PHPUnit_Util_Filter::removeDirectoryFromFilter($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['blacklist']['exclude']['file'] as $file) {
             PHPUnit_Util_Filter::removeFileFromFilter($file);
         }
         foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) {
             PHPUnit_Util_Filter::addDirectoryToWhitelist($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['whitelist']['include']['file'] as $file) {
             PHPUnit_Util_Filter::addFileToWhitelist($file);
         }
         foreach ($filterConfiguration['whitelist']['exclude']['directory'] as $dir) {
             PHPUnit_Util_Filter::removeDirectoryFromWhitelist($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['whitelist']['exclude']['file'] as $file) {
             PHPUnit_Util_Filter::removeFileFromWhitelist($file);
         }
         $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration();
         if (isset($phpunitConfiguration['ansi']) && !isset($arguments['ansi'])) {
             $arguments['ansi'] = $phpunitConfiguration['ansi'];
         }
         if (isset($phpunitConfiguration['convertErrorsToExceptions']) && !isset($arguments['convertErrorsToExceptions'])) {
             $arguments['convertErrorsToExceptions'] = $phpunitConfiguration['convertErrorsToExceptions'];
         }
         if (isset($phpunitConfiguration['convertNoticesToExceptions']) && !isset($arguments['convertNoticesToExceptions'])) {
             $arguments['convertNoticesToExceptions'] = $phpunitConfiguration['convertNoticesToExceptions'];
         }
         if (isset($phpunitConfiguration['convertWarningsToExceptions']) && !isset($arguments['convertWarningsToExceptions'])) {
             $arguments['convertWarningsToExceptions'] = $phpunitConfiguration['convertWarningsToExceptions'];
         }
         if (isset($phpunitConfiguration['stopOnFailure']) && !isset($arguments['stopOnFailure'])) {
             $arguments['stopOnFailure'] = $phpunitConfiguration['stopOnFailure'];
         }
         $groupConfiguration = $arguments['configuration']->getGroupConfiguration();
         if (!empty($groupConfiguration['include']) && !isset($arguments['groups'])) {
             $arguments['groups'] = $groupConfiguration['include'];
         }
         if (!empty($groupConfiguration['exclude']) && !isset($arguments['excludeGroups'])) {
             $arguments['excludeGroups'] = $groupConfiguration['exclude'];
         }
         $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration();
         if (isset($loggingConfiguration['coverage-html']) && !isset($arguments['reportDirectory'])) {
             if (isset($loggingConfiguration['charset']) && !isset($arguments['reportCharset'])) {
                 $arguments['reportCharset'] = $loggingConfiguration['charset'];
             }
             if (isset($loggingConfiguration['yui']) && !isset($arguments['reportYUI'])) {
                 $arguments['reportYUI'] = $loggingConfiguration['yui'];
             }
             if (isset($loggingConfiguration['highlight']) && !isset($arguments['reportHighlight'])) {
                 $arguments['reportHighlight'] = $loggingConfiguration['highlight'];
             }
             if (isset($loggingConfiguration['lowUpperBound']) && !isset($arguments['reportLowUpperBound'])) {
                 $arguments['reportLowUpperBound'] = $loggingConfiguration['lowUpperBound'];
             }
             if (isset($loggingConfiguration['highLowerBound']) && !isset($arguments['reportHighLowerBound'])) {
                 $arguments['reportHighLowerBound'] = $loggingConfiguration['highLowerBound'];
             }
             $arguments['reportDirectory'] = $loggingConfiguration['coverage-html'];
         }
         if (isset($loggingConfiguration['coverage-clover']) && !isset($arguments['coverageClover'])) {
             $arguments['coverageClover'] = $loggingConfiguration['coverage-clover'];
         }
         if (isset($loggingConfiguration['coverage-xml']) && !isset($arguments['coverageClover'])) {
             $arguments['coverageClover'] = $loggingConfiguration['coverage-xml'];
         }
         if (isset($loggingConfiguration['coverage-source']) && !isset($arguments['coverageSource'])) {
             $arguments['coverageSource'] = $loggingConfiguration['coverage-source'];
         }
         if (isset($loggingConfiguration['graphviz']) && !isset($arguments['graphvizLogfile'])) {
             $arguments['graphvizLogfile'] = $loggingConfiguration['graphviz'];
         }
//.........这里部分代码省略.........
开发者ID:xiplias,项目名称:pails,代码行数:101,代码来源:TestRunner.php

示例4: handleCustomTestSuite

 protected function handleCustomTestSuite()
 {
     $directory = getcwd();
     $packages = $this->options[1];
     if (isset($this->arguments['coverageClover']) || isset($this->arguments['reportDirectory'])) {
         $fillWhitelist = true;
     } else {
         $fillWhitelist = false;
     }
     $this->arguments['test'] = new PHPUnit_Framework_TestSuite();
     $this->arguments['test']->setName('eZ Components');
     if (empty($packages)) {
         $packages = $this->getPackages($directory);
     }
     foreach ($packages as $package) {
         $added = false;
         $slashCount = substr_count($package, DIRECTORY_SEPARATOR);
         if ($this->release == 'trunk' && $slashCount !== 0 || $this->release == 'stable' && $slashCount > 1) {
             if (file_exists($package)) {
                 PHPUnit_Util_Class::collectStart();
                 require_once $package;
                 $class = PHPUnit_Util_Class::collectEnd();
                 if (!empty($class)) {
                     $this->arguments['test']->addTest(call_user_func(array(array_pop($class), 'suite')));
                     $added = true;
                     $package = substr($package, 0, strpos($package, DIRECTORY_SEPARATOR));
                 } else {
                     die("\n Cannot load: {$package}. \n");
                 }
             }
         } else {
             $suite = $this->getTestSuite($directory, $package);
             if (!is_null($suite)) {
                 $this->arguments['test']->addTest($suite);
                 $added = true;
             }
         }
         if ($fillWhitelist && $added) {
             foreach (glob($directory . '/' . $package . '/src/*_autoload.php') as $autoloadFile) {
                 foreach (include $autoloadFile as $className => $fileName) {
                     if (strpos($fileName, 'xmlwritersubstitute.php') === false) {
                         PHPUnit_Util_Filter::addFileToWhitelist($directory . '/' . str_replace($package, $package . '/src', $fileName));
                     }
                 }
             }
         }
     }
     if (isset($this->arguments['colors']) && $this->arguments['colors'] === true) {
         $colors = true;
     } else {
         $colors = false;
     }
     if (isset($this->arguments['debug']) && $this->arguments['debug'] === true) {
         $debug = true;
     } else {
         $debug = false;
     }
     if (isset($this->arguments['verbose']) && $this->arguments['verbose'] === true) {
         $verbose = true;
     } else {
         $verbose = false;
     }
     $this->arguments['printer'] = new ezcTestPrinter(NULL, $verbose, $colors, $debug);
 }
开发者ID:naderman,项目名称:pflow,代码行数:64,代码来源:runner.php

示例5: error_reporting

 * @category    cfh
 * @package     cfhCompile
 * @subpackage  UnitTests
 * @copyright   Copyright (c) 2007 - 2008 William Bailey <william.bailey@cowboysfromhell.co.uk>.
 * @license     http://www.gnu.org/licenses/lgpl.html     Lesser GPL
 * @version     $Id$
 */
error_reporting(E_ALL | E_STRICT);
chdir(dirname(__FILE__));
require_once 'PHPUnit/Util/Filter.php';
require_once 'PHPUnit/Framework/TestSuite.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
require_once 'PHPUnit/Extensions/Database/TestCase.php';
if (file_exists('cfhCompile.compiled.php')) {
    require_once 'cfhCompile.compiled.php';
    PHPUnit_Util_Filter::addFileToWhitelist('cfhCompile.compiled.php');
} else {
    require_once '../library/cfhCompile/Loader.php';
    cfhCompile_Loader::registerAutoload();
    PHPUnit_Util_Filter::addDirectoryToWhitelist(realpath('../library/'));
    PHPUnit_Util_Filter::addFileToFilter(__FILE__);
}
/**
 * Main Unit Test Class.
 *
 * @category    cfh
 * @package     cfhCompile
 * @subpackage  UnitTests
 * @copyright   Copyright (c) 2007 - 2008 William Bailey <william.bailey@cowboysfromhell.co.uk>.
 */
class AllTests
开发者ID:googlecode-mirror,项目名称:cfh-compile,代码行数:31,代码来源:AllTests.php

示例6: handleConfiguration

 /**
  * @param  array $arguments
  * @since  Method available since Release 3.2.1
  */
 protected function handleConfiguration(array &$arguments)
 {
     if (isset($arguments['configuration']) && !$arguments['configuration'] instanceof PHPUnit_Util_Configuration) {
         $arguments['configuration'] = PHPUnit_Util_Configuration::getInstance($arguments['configuration']);
         $arguments['pmd'] = $arguments['configuration']->getPMDConfiguration();
     } else {
         $arguments['pmd'] = array();
     }
     $arguments['debug'] = isset($arguments['debug']) ? $arguments['debug'] : FALSE;
     $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : FALSE;
     $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array();
     $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : FALSE;
     $arguments['testDatabasePrefix'] = isset($arguments['testDatabasePrefix']) ? $arguments['testDatabasePrefix'] : '';
     $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : FALSE;
     $arguments['wait'] = isset($arguments['wait']) ? $arguments['wait'] : FALSE;
     if (isset($arguments['configuration'])) {
         $arguments['configuration']->handlePHPConfiguration();
         $filterConfiguration = $arguments['configuration']->getFilterConfiguration();
         PHPUnit_Util_Filter::$addUncoveredFilesFromWhitelist = $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist'];
         foreach ($filterConfiguration['blacklist']['include']['directory'] as $dir) {
             PHPUnit_Util_Filter::addDirectoryToFilter($dir['path'], $dir['suffix'], $dir['group'], $dir['prefix']);
         }
         foreach ($filterConfiguration['blacklist']['include']['file'] as $file) {
             PHPUnit_Util_Filter::addFileToFilter($file);
         }
         foreach ($filterConfiguration['blacklist']['exclude']['directory'] as $dir) {
             PHPUnit_Util_Filter::removeDirectoryFromFilter($dir['path'], $dir['suffix'], $dir['group'], $dir['prefix']);
         }
         foreach ($filterConfiguration['blacklist']['exclude']['file'] as $file) {
             PHPUnit_Util_Filter::removeFileFromFilter($file);
         }
         foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) {
             PHPUnit_Util_Filter::addDirectoryToWhitelist($dir['path'], $dir['suffix'], $dir['prefix']);
         }
         foreach ($filterConfiguration['whitelist']['include']['file'] as $file) {
             PHPUnit_Util_Filter::addFileToWhitelist($file);
         }
         foreach ($filterConfiguration['whitelist']['exclude']['directory'] as $dir) {
             PHPUnit_Util_Filter::removeDirectoryFromWhitelist($dir['path'], $dir['suffix'], $dir['prefix']);
         }
         foreach ($filterConfiguration['whitelist']['exclude']['file'] as $file) {
             PHPUnit_Util_Filter::removeFileFromWhitelist($file);
         }
         $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration();
         if (isset($phpunitConfiguration['backupGlobals']) && !isset($arguments['backupGlobals'])) {
             $arguments['backupGlobals'] = $phpunitConfiguration['backupGlobals'];
         }
         if (isset($phpunitConfiguration['backupStaticAttributes']) && !isset($arguments['backupStaticAttributes'])) {
             $arguments['backupStaticAttributes'] = $phpunitConfiguration['backupStaticAttributes'];
         }
         if (isset($phpunitConfiguration['bootstrap']) && !isset($arguments['bootstrap'])) {
             $arguments['bootstrap'] = $phpunitConfiguration['bootstrap'];
         }
         if (isset($phpunitConfiguration['colors']) && !isset($arguments['colors'])) {
             $arguments['colors'] = $phpunitConfiguration['colors'];
         }
         if (isset($phpunitConfiguration['convertErrorsToExceptions']) && !isset($arguments['convertErrorsToExceptions'])) {
             $arguments['convertErrorsToExceptions'] = $phpunitConfiguration['convertErrorsToExceptions'];
         }
         if (isset($phpunitConfiguration['convertNoticesToExceptions']) && !isset($arguments['convertNoticesToExceptions'])) {
             $arguments['convertNoticesToExceptions'] = $phpunitConfiguration['convertNoticesToExceptions'];
         }
         if (isset($phpunitConfiguration['convertWarningsToExceptions']) && !isset($arguments['convertWarningsToExceptions'])) {
             $arguments['convertWarningsToExceptions'] = $phpunitConfiguration['convertWarningsToExceptions'];
         }
         if (isset($phpunitConfiguration['processIsolation']) && !isset($arguments['processIsolation'])) {
             $arguments['processIsolation'] = $phpunitConfiguration['processIsolation'];
         }
         if (isset($phpunitConfiguration['stopOnFailure']) && !isset($arguments['stopOnFailure'])) {
             $arguments['stopOnFailure'] = $phpunitConfiguration['stopOnFailure'];
         }
         $groupConfiguration = $arguments['configuration']->getGroupConfiguration();
         if (!empty($groupConfiguration['include']) && !isset($arguments['groups'])) {
             $arguments['groups'] = $groupConfiguration['include'];
         }
         if (!empty($groupConfiguration['exclude']) && !isset($arguments['excludeGroups'])) {
             $arguments['excludeGroups'] = $groupConfiguration['exclude'];
         }
         foreach ($arguments['configuration']->getListenerConfiguration() as $listener) {
             if (!class_exists($listener['class'], FALSE) && $listener['file'] !== '') {
                 $file = PHPUnit_Util_Filesystem::fileExistsInIncludePath($listener['file']);
                 if ($file !== FALSE) {
                     require $file;
                 }
             }
             if (class_exists($listener['class'], FALSE)) {
                 if (count($listener['arguments']) == 0) {
                     $listener = new $listener['class']();
                 } else {
                     $listenerClass = new ReflectionClass($listener['class']);
                     $listener = $listenerClass->newInstanceArgs($listener['arguments']);
                 }
                 if ($listener instanceof PHPUnit_Framework_TestListener) {
                     $arguments['listeners'][] = $listener;
                 }
             }
//.........这里部分代码省略.........
开发者ID:qcodo,项目名称:qcodo-website,代码行数:101,代码来源:TestRunner.php

示例7: handleCoverageFilter

 private function handleCoverageFilter($file)
 {
     if ($this->consider_covers_files == false) {
         return;
     }
     $data = file_get_contents($file);
     foreach (explode("\n", $data) as $line) {
         $file = str_replace(array('BASE', 'APP', 'LIB', 'FWK', '*'), array(AK_BASE_DIR, AK_APP_DIR, AK_LIB_DIR, AK_FRAMEWORK_DIR, ''), $line);
         if (is_file($file)) {
             $this->consider_covers_files == 'white' ? PHPUnit_Util_Filter::addFileToWhitelist($file) : PHPUnit_Util_Filter::addFileToFilter($file);
         } elseif (is_dir($file)) {
             $this->consider_covers_files == 'white' ? PHPUnit_Util_Filter::addDirectoryToWhitelist($file) : PHPUnit_Util_Filter::addDirectoryToFilter($file);
         }
     }
 }
开发者ID:joeymetal,项目名称:v1,代码行数:15,代码来源:test_runner.php

示例8: handleConfiguration

 /**
  * @param  array $arguments
  * @access protected
  * @since  Method available since Release 3.2.1
  */
 protected function handleConfiguration(array &$arguments)
 {
     if (isset($arguments['configuration'])) {
         $arguments['configuration'] = new PHPUnit_Util_Configuration($arguments['configuration']);
         $arguments['pmd'] = $arguments['configuration']->getPMDConfiguration();
     } else {
         $arguments['pmd'] = array();
     }
     $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : FALSE;
     $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array();
     $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : FALSE;
     $arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : FALSE;
     $arguments['testDatabasePrefix'] = isset($arguments['testDatabasePrefix']) ? $arguments['testDatabasePrefix'] : '';
     $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : FALSE;
     $arguments['wait'] = isset($arguments['wait']) ? $arguments['wait'] : FALSE;
     if (isset($arguments['configuration'])) {
         $filterConfiguration = $arguments['configuration']->getFilterConfiguration();
         PHPUnit_Util_Filter::$addUncoveredFilesFromWhitelist = $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist'];
         foreach ($filterConfiguration['blacklist']['include']['directory'] as $dir) {
             PHPUnit_Util_Filter::addDirectoryToFilter($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['blacklist']['include']['file'] as $file) {
             PHPUnit_Util_Filter::addFileToFilter($file);
         }
         foreach ($filterConfiguration['blacklist']['exclude']['directory'] as $dir) {
             PHPUnit_Util_Filter::removeDirectoryFromFilter($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['blacklist']['exclude']['file'] as $file) {
             PHPUnit_Util_Filter::removeFileFromFilter($file);
         }
         foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) {
             PHPUnit_Util_Filter::addDirectoryToWhitelist($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['whitelist']['include']['file'] as $file) {
             PHPUnit_Util_Filter::addFileToWhitelist($file);
         }
         foreach ($filterConfiguration['whitelist']['exclude']['directory'] as $dir) {
             PHPUnit_Util_Filter::removeDirectoryFromWhitelist($dir['path'], $dir['suffix']);
         }
         foreach ($filterConfiguration['whitelist']['exclude']['file'] as $file) {
             PHPUnit_Util_Filter::removeFileFromWhitelist($file);
         }
         $phpConfiguration = $arguments['configuration']->getPHPConfiguration();
         foreach ($phpConfiguration['ini'] as $name => $value) {
             ini_set($name, $value);
         }
         foreach ($phpConfiguration['var'] as $name => $value) {
             $GLOBALS[$name] = $value;
         }
         $groupConfiguration = $arguments['configuration']->getGroupConfiguration();
         if (!empty($groupConfiguration['include']) && !isset($arguments['groups'])) {
             $arguments['groups'] = $groupConfiguration['include'];
         }
         if (!empty($groupConfiguration['exclude']) && !isset($arguments['excludeGroups'])) {
             $arguments['excludeGroups'] = $groupConfiguration['exclude'];
         }
         $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration();
         if (isset($loggingConfiguration['coverage-html']) && !isset($arguments['reportDirectory'])) {
             if (isset($loggingConfiguration['charset']) && !isset($arguments['reportCharset'])) {
                 $arguments['reportCharset'] = $loggingConfiguration['charset'];
             }
             if (isset($loggingConfiguration['yui']) && !isset($arguments['reportYUI'])) {
                 $arguments['reportYUI'] = $loggingConfiguration['yui'];
             }
             if (isset($loggingConfiguration['highlight']) && !isset($arguments['reportHighlight'])) {
                 $arguments['reportHighlight'] = $loggingConfiguration['highlight'];
             }
             if (isset($loggingConfiguration['lowUpperBound']) && !isset($arguments['reportLowUpperBound'])) {
                 $arguments['reportLowUpperBound'] = $loggingConfiguration['lowUpperBound'];
             }
             if (isset($loggingConfiguration['highLowerBound']) && !isset($arguments['reportHighLowerBound'])) {
                 $arguments['reportHighLowerBound'] = $loggingConfiguration['highLowerBound'];
             }
             $arguments['reportDirectory'] = $loggingConfiguration['coverage-html'];
         }
         if (isset($loggingConfiguration['coverage-xml']) && !isset($arguments['coverageXML'])) {
             $arguments['coverageXML'] = $loggingConfiguration['coverage-xml'];
         }
         if (isset($loggingConfiguration['graphviz']) && !isset($arguments['graphvizLogfile'])) {
             $arguments['graphvizLogfile'] = $loggingConfiguration['graphviz'];
         }
         if (isset($loggingConfiguration['json']) && !isset($arguments['jsonLogfile'])) {
             $arguments['jsonLogfile'] = $loggingConfiguration['json'];
         }
         if (isset($loggingConfiguration['metrics-xml']) && !isset($arguments['metricsXML'])) {
             $arguments['metricsXML'] = $loggingConfiguration['metrics-xml'];
         }
         if (isset($loggingConfiguration['plain'])) {
             $arguments['listeners'][] = new PHPUnit_TextUI_ResultPrinter($loggingConfiguration['plain'], TRUE);
         }
         if (isset($loggingConfiguration['pmd-xml']) && !isset($arguments['pmdXML'])) {
             if (isset($loggingConfiguration['cpdMinLines']) && !isset($arguments['cpdMinLines'])) {
                 $arguments['cpdMinLines'] = $loggingConfiguration['cpdMinLines'];
             }
             if (isset($loggingConfiguration['cpdMinMatches']) && !isset($arguments['cpdMinMatches'])) {
//.........这里部分代码省略.........
开发者ID:humansky,项目名称:qframe,代码行数:101,代码来源:TestRunner.php

示例9: define

    define('oxADMIN_PASSWD', 'admin');
}
if (getenv('CODECOVERAGE')) {
    // PHPUnit_Util_Filter configuration
    PHPUnit_Util_Filter::$addUncoveredFilesFromWhitelist = true;
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/chromephp/chromephp_admin_list.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/chromephp/chromephp_admin_file.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/chromephp/chromephp_admin.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/chromephp/chromephp_admin_perform.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/chromephp/chromephp_admin_main.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/helper/helper_admin_list.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/helper/helper_admin_modules.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/Admin/helper/helper_admin_iframe.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/testperformance.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/modulemanagerlist.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/filemanager.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/chromephpmanager.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/authorization.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/chromephp.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/modulemanager.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/mysqlmanager.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/modulemanageranalize.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/include/chromephpfile.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/include/chromephpmysqlreading.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/include/chromephpmysql.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/include/chromephpheader.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/core/include/chromephpblocked.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/extensions/chromephp_oxutilsview.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/extensions/chromephp_oxshopcontrol.php');
    PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . 'modules/debugax/view/helper_modules.php');
}
开发者ID:OXIDprojects,项目名称:debugax,代码行数:31,代码来源:bootstrap.php

示例10: set_whitelist

	/**
	 * Recursively whitelists an array of files
	 *
	 * @param array $files Array of files to whitelist
	 */
	static protected function set_whitelist($files)
	{
		foreach($files as $file)
		{
			if(is_array($file))
			{
				self::set_whitelist($file);
			}
			else
			{
				if( ! isset(Kohana_Tests::$cache[$file]))
				{
					$relative_path	= substr($file, strrpos($file, 'classes/') + 8, -strlen(EXT));
					$cascading_file = Kohana::find_file('classes', $relative_path);

					// The theory is that if this file is the highest one in the cascading filesystem
					// then it's safe to whitelist
					Kohana_Tests::$cache[$file] =  ($cascading_file === $file);
				}
		
				if(Kohana_Tests::$cache[$file])
				{
					PHPUnit_Util_Filter::addFileToWhitelist($file);
				}
			}
		}
	}
开发者ID:nike-17,项目名称:unittest,代码行数:32,代码来源:tests.php

示例11:

<?php

// Add "PHPUnit_Util_Filter::addFileToWhitelist( PATH_TO_FILE )" to add files to coverage
// you can use the 'oxPATH' constant as the path to the shops root
// PHPUnit_Util_Filter::addFileToWhitelist( oxPATH . '/modules/vendor/mymodule/core/myarticle.php' );
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/api.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/base.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/exception.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/notification.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/request_base.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/request_payment.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/request_refund.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/request_resend.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/api/request_update.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/controllers/bz_barzahlen_callback.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/controllers/bz_barzahlen_payment.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/controllers/bz_barzahlen_thankyou.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/controllers/bz_barzahlen_transactions.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/models/bz_barzahlen_order.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/models/bz_barzahlen_payment_gateway.php');
PHPUnit_Util_Filter::addFileToWhitelist(oxPATH . '/modules/bz_barzahlen/models/bz_barzahlen_update_handler.php');
开发者ID:alexschwarz89,项目名称:Barzahlen-OXID-4.7,代码行数:21,代码来源:coverage.inc.php

示例12: includeCoverage

 protected static function includeCoverage()
 {
     PHPUnit_Util_Filter::addFileToWhitelist(VAF_PATH . '/html/vafAjax.include.php');
 }
开发者ID:hashir-dhattiwala,项目名称:vfmagento,代码行数:4,代码来源:TestSuite.php

示例13: _whitelist

 protected function _whitelist()
 {
     $folders = array('helpers', 'controllers', 'libraries');
     foreach ($folders as $folder) {
         $files = self::list_files($folder, TRUE);
         foreach ($files as $file) {
             if (is_file($file)) {
                 if ($file == __FILE__) {
                     continue;
                 } else {
                     PHPUnit_Util_Filter::addFileToWhitelist($file);
                 }
             }
         }
     }
 }
开发者ID:swk,项目名称:bluebox,代码行数:16,代码来源:PHPUnit.php

示例14: set_time_limit

 * File containing the runtests CLI script
 *
 * @copyright Copyright (C) 1999-2010 eZ Systems AS. All rights reserved.
 * @license http://ez.no/licenses/gnu_gpl GNU GPLv2
 * @package tests
 */
set_time_limit(0);
require_once 'autoload.php';
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
require_once 'tests/toolkit/ezptestrunner.php';
// Exclude the test system from code coverage reports
PHPUnit_Util_Filter::addDirectoryToFilter(getcwd() . '/tests');
// Whitelist all eZ Publish kernel files
$baseDir = getcwd();
$autoloadArray = (include 'autoload/ezp_kernel.php');
foreach ($autoloadArray as $class => $file) {
    // Exclude files from the tests directory
    if (strpos($file, 'tests') !== 0) {
        PHPUnit_Util_Filter::addFileToWhitelist("{$baseDir}/{$file}");
    }
}
$cli = eZCLI::instance();
$script = eZScript::instance(array('description' => "eZ Publish Test Runner\n\n" . "sets up an eZ Publish testing environment" . "\n", 'use-session' => false, 'use-modules' => true, 'use-extensions' => true));
$script->startup();
// $options = $script->getOptions();
$script->initialize();
// Avoids Fatal error: eZ Publish did not finish its request if die() is used.
eZExecution::setCleanExit();
ezpTestRunner::main();
$script->shutdown();
开发者ID:runelangseid,项目名称:ezpublish,代码行数:31,代码来源:runtests.php

示例15: set_whitelist

 /**
  * Recursively whitelists an array of files
  *
  * @param array $files Array of files to whitelist
  * @param Unittest_TestSuite $suite Suite to load the whitelist into
  */
 protected static function set_whitelist($files, Unittest_TestSuite $suite = NULL)
 {
     foreach ($files as $file) {
         if (is_array($file)) {
             self::set_whitelist($file, $suite);
         } else {
             if (!isset(Unittest_tests::$cache[$file])) {
                 $relative_path = substr($file, strrpos($file, 'classes' . DIRECTORY_SEPARATOR) + 8, -strlen(EXT));
                 $cascading_file = Kohana::find_file('classes', $relative_path);
                 // The theory is that if this file is the highest one in the cascading filesystem
                 // then it's safe to whitelist
                 Unittest_tests::$cache[$file] = $cascading_file === $file;
             }
             if (Unittest_tests::$cache[$file]) {
                 if (isset($suite)) {
                     $suite->addFileToWhitelist($file);
                 } else {
                     PHPUnit_Util_Filter::addFileToWhitelist($file);
                 }
             }
         }
     }
 }
开发者ID:artbypravesh,项目名称:morningpages,代码行数:29,代码来源:Tests.php


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