test_files.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. if (!defined('HTMLPurifierTest')) exit;
  3. // These arrays are defined by this file and can be relied upon.
  4. $test_files = array();
  5. $test_dirs = array();
  6. $test_dirs_exclude = array();
  7. $vtest_dirs = array();
  8. $htmlt_dirs = array();
  9. $phpt_dirs = array();
  10. $break = true;
  11. switch ($AC['type']) {
  12. case '':
  13. $break = false;
  14. case 'htmlpurifier':
  15. $test_dirs[] = 'HTMLPurifier';
  16. $test_files[] = 'HTMLPurifierTest.php';
  17. $test_dirs_exclude['HTMLPurifier/Filter/ExtractStyleBlocksTest.php'] = true;
  18. if ($csstidy_location) {
  19. $test_files[] = 'HTMLPurifier/Filter/ExtractStyleBlocksTest.php';
  20. }
  21. if ($break) break;
  22. case 'configdoc':
  23. if (version_compare(PHP_VERSION, '5.2', '>=')) {
  24. // $test_dirs[] = 'ConfigDoc'; // no test files currently!
  25. }
  26. if ($break) break;
  27. case 'fstools':
  28. $test_dirs[] = 'FSTools';
  29. case 'htmlt':
  30. $htmlt_dirs[] = 'HTMLPurifier/HTMLT';
  31. if ($break) break;
  32. case 'vtest':
  33. $vtest_dirs[] = 'HTMLPurifier/ConfigSchema/Validator';
  34. if ($break) break;
  35. case 'phpt':
  36. if (!$AC['disable-phpt'] && version_compare(PHP_VERSION, '5.2', '>=')) {
  37. $phpt_dirs[] = 'HTMLPurifier/PHPT';
  38. }
  39. }
  40. // vim: et sw=4 sts=4