本文整理汇总了PHP中PHPUnit_Util_Filter::removeFileFromFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Util_Filter::removeFileFromFilter方法的具体用法?PHP PHPUnit_Util_Filter::removeFileFromFilter怎么用?PHP PHPUnit_Util_Filter::removeFileFromFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Util_Filter
的用法示例。
在下文中一共展示了PHPUnit_Util_Filter::removeFileFromFilter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: suite
public static function suite()
{
// hack to allow us to view code coverage for Log.php
PHPUnit_Util_Filter::removeFileFromFilter('Log.php', 'PEAR');
$suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Log');
$suite->addTestSuite('Zend_Log_LogTest');
$suite->addTestSuite('Zend_Log_Filter_ChainingTest');
$suite->addTestSuite('Zend_Log_Filter_PriorityTest');
$suite->addTestSuite('Zend_Log_Filter_MessageTest');
$suite->addTestSuite('Zend_Log_Formatter_SimpleTest');
$suite->addTestSuite('Zend_Log_Formatter_XmlTest');
$suite->addTestSuite('Zend_Log_Writer_DbTest');
$suite->addTestSuite('Zend_Log_Writer_MockTest');
$suite->addTestSuite('Zend_Log_Writer_NullTest');
$suite->addTestSuite('Zend_Log_Writer_StreamTest');
return $suite;
}
示例2: suite
public static function suite()
{
// hack to allow us to view code coverage for Log.php
PHPUnit_Util_Filter::removeFileFromFilter(dirname(__FILE__) . '/../../../library/Zend/Log.php', 'PEAR');
$suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Log');
$suite->addTestSuite('Zend_Log_LogTest');
$suite->addTestSuite('Zend_Log_Filter_ChainingTest');
$suite->addTestSuite('Zend_Log_Filter_PriorityTest');
$suite->addTestSuite('Zend_Log_Filter_MessageTest');
$suite->addTestSuite('Zend_Log_Filter_SuppressTest');
$suite->addTestSuite('Zend_Log_Formatter_SimpleTest');
$suite->addTestSuite('Zend_Log_Formatter_XmlTest');
$suite->addTestSuite('Zend_Log_Writer_DbTest');
if (PHP_OS != 'AIX') {
$suite->addTestSuite('Zend_Log_Writer_FirebugTest');
}
$suite->addTestSuite('Zend_Log_Writer_MailTest');
$suite->addTestSuite('Zend_Log_Writer_MockTest');
$suite->addTestSuite('Zend_Log_Writer_NullTest');
$suite->addTestSuite('Zend_Log_Writer_StreamTest');
return $suite;
}
示例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'];
}
//.........这里部分代码省略.........
示例4: 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;
}
}
//.........这里部分代码省略.........
示例5: 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'])) {
//.........这里部分代码省略.........