phpunit.bootstrap.inc 683 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // set error reporting high
  3. error_reporting(E_ALL | E_STRICT);
  4. // make sure we see them
  5. ini_set('display_errors', 'On');
  6. // make sure current directory and class directories are on include path
  7. // this is necessary for auto load to work
  8. set_include_path(
  9. // distribution files (where the zip / tgz is unpacked)
  10. dirname(dirname(__FILE__)) . PATH_SEPARATOR .
  11. // test file directory "tests"
  12. dirname(__FILE__) . PATH_SEPARATOR .
  13. // current include path (for PHPUnit, etc.)
  14. get_include_path()
  15. );
  16. // set up an autoload for Zend / Pear style class loading
  17. spl_autoload_register(
  18. function($class)
  19. {
  20. include(str_replace("_", DIRECTORY_SEPARATOR, $class) . ".php");
  21. }
  22. );