/** * Blacklist a set of files in PHPUnit code coverage * * @param array $blacklist_items A set of files to blacklist * @param Unittest_TestSuite $suite The test suite */ public static function blacklist(array $blacklist_items, Unittest_TestSuite $suite = NULL) { foreach ($blacklist_items as $item) { if (is_dir($item)) { $suite->addDirectoryToBlacklist($item); } else { $suite->addFileToBlacklist($item); } } }
/** * Blacklist a set of files in PHPUnit code coverage * * @param array $blacklist_items A set of files to blacklist * @param Unittest_TestSuite $suite The test suite */ public static function blacklist(array $blacklist_items, Unittest_TestSuite $suite = NULL) { if (self::$phpunit_v35) { foreach ($blacklist_items as $item) { if (is_dir($item)) { $suite->addDirectoryToBlacklist($item); } else { $suite->addFileToBlacklist($item); } } } else { foreach ($blacklist_items as $item) { if (is_dir($item)) { PHPUnit_Util_Filter::addDirectoryToFilter($item); } else { PHPUnit_Util_Filter::addFileToFilter($item); } } } }