test-settings.sample.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. // ATTENTION! DO NOT EDIT THIS FILE!
  3. // This file is necessary to run the unit tests and profiling scripts.
  4. // Please copy it to 'test-settings.php' and make the necessary edits.
  5. // Note: The only external library you *need* is SimpleTest; everything else
  6. // is optional.
  7. // We've got a lot of tests, so we recommend turning the limit off.
  8. set_time_limit(0);
  9. // Turning off output buffering will prevent mysterious errors from core dumps.
  10. $data = @ob_get_clean();
  11. if ($data !== false && $data !== '') {
  12. echo "Output buffer contains data [".urlencode($data)."]\n";
  13. exit;
  14. }
  15. // -----------------------------------------------------------------------------
  16. // REQUIRED SETTINGS
  17. // Note on running SimpleTest:
  18. // Because HTML Purifier is PHP5-only and E_STRICT compliant, SimpleTest
  19. // 1.0.1 will not work; you need to run SimpleTest off its trunk using:
  20. //
  21. // $ svn co https://simpletest.svn.sourceforge.net/svnroot/simpletest/simpletest/trunk simpletest
  22. //
  23. // If SimpleTest is borked with HTML Purifier, please contact me or
  24. // the SimpleTest devs; I am a developer for SimpleTest so I should be
  25. // able to quickly assess a fix. SimpleTest's problem is my problem!
  26. // Where is SimpleTest located? Remember to include a trailing slash!
  27. $simpletest_location = '/path/to/simpletest/';
  28. // -----------------------------------------------------------------------------
  29. // OPTIONAL SETTINGS
  30. // Note on running PHPT:
  31. // Vanilla PHPT from https://github.com/tswicegood/PHPT_Core should
  32. // work fine on Linux w/o multitest.
  33. //
  34. // To do multitest or Windows testing, you'll need some more
  35. // patches at https://github.com/ezyang/PHPT_Core
  36. //
  37. // I haven't tested the Windows setup in a while so I don't know if
  38. // it still works.
  39. // Should PHPT tests be enabled?
  40. $GLOBALS['HTMLPurifierTest']['PHPT'] = false;
  41. // If PHPT isn't in your Path via PEAR, set that here:
  42. // set_include_path('/path/to/phpt/Core/src' . PATH_SEPARATOR . get_include_path());
  43. // Where is CSSTidy located? (Include trailing slash. Leave false to disable.)
  44. $csstidy_location = false;
  45. // For tests/multitest.php, which versions to test?
  46. $versions_to_test = array();
  47. // Stable PHP binary to use when invoking maintenance scripts.
  48. $php = 'php';
  49. // For tests/multitest.php, what is the multi-version executable? It must
  50. // accept an extra parameter (version number) before all other arguments
  51. $phpv = false;
  52. // Should PEAR tests be run? If you've got a valid PEAR installation, set this
  53. // to true (or, if it's not in the include path, to its install directory).
  54. $GLOBALS['HTMLPurifierTest']['PEAR'] = false;
  55. // If PEAR is enabled, what PEAR tests should be run? (Note: you will
  56. // need to ensure these libraries are installed)
  57. $GLOBALS['HTMLPurifierTest']['Net_IDNA2'] = true;
  58. // vim: et sw=4 sts=4