Exemplo n.º 1
0
 /**
  * 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);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * 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);
             }
         }
     }
 }