config.php 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. //Error reporting settings
  3. error_reporting(E_ALL | E_STRICT); ini_set('display_errors', true);
  4. if (defined('E_DEPRECATED'))
  5. {
  6. error_reporting(error_reporting() | E_DEPRECATED);
  7. }
  8. //E_STRICT compliance -- If you change this timezone some tests may fail -
  9. // This only affects the tests, you need to ensure PHP is correctly set up in
  10. // your own code
  11. date_default_timezone_set('Australia/ACT');
  12. //Time limit to process all tests
  13. set_time_limit(30);
  14. //The path to the PHP command line executable (auto-detected if none set)
  15. define('SWEETY_PHP_EXE', '');
  16. //The path to this file
  17. define('SWEETY_HOME', dirname(__FILE__));
  18. //The path to the libs being tested
  19. define('SWEETY_INCLUDE_PATH',
  20. SWEETY_HOME . '/../lib/classes' . PATH_SEPARATOR .
  21. SWEETY_HOME . '/../lib' . PATH_SEPARATOR .
  22. SWEETY_HOME . '/../tests/helpers'
  23. );
  24. //The path to the main test suite
  25. define('SWEETY_LIB_PATH', SWEETY_HOME . '/lib');
  26. //The path to simpletest
  27. define('SWEETY_SIMPLETEST_PATH', SWEETY_LIB_PATH . '/simpletest');
  28. //The path to any testing directories
  29. define('SWEETY_TEST_PATH',
  30. SWEETY_HOME . '/../tests/unit' .
  31. PATH_SEPARATOR . SWEETY_HOME . '/../tests/acceptance' .
  32. PATH_SEPARATOR . SWEETY_HOME . '/../tests/smoke' .
  33. PATH_SEPARATOR . SWEETY_HOME . '/../tests/bug'
  34. );
  35. //Test locator strategies, separated by commas
  36. define('SWEETY_TEST_LOCATOR', 'Sweety_TestLocator_PearStyleLocator');
  37. //A pattern used for filtering out certain class names expected to be tests
  38. define('SWEETY_IGNORED_CLASSES', '/(^|_)Abstract/');
  39. //The name which appears at the top of the test suite
  40. define('SWEETY_SUITE_NAME', 'Swift Mailer 4 Test Suite');
  41. //The path to the template which renders the view
  42. define('SWEETY_UI_TEMPLATE', SWEETY_HOME . '/templates/sweety/suite-ui.tpl.php');
  43. //Most likely you won't want to modify the include_path
  44. set_include_path(
  45. get_include_path() . PATH_SEPARATOR .
  46. SWEETY_LIB_PATH . PATH_SEPARATOR .
  47. SWEETY_INCLUDE_PATH . PATH_SEPARATOR .
  48. SWEETY_TEST_PATH
  49. );
  50. //Load in any dependencies
  51. require_once 'Sweety/TestLocator/PearStyleLocator.php';
  52. require_once 'swift_required.php';
  53. //Load in some swift specific testig config
  54. require_once SWEETY_HOME . '/../tests/acceptance.conf.php';
  55. require_once SWEETY_HOME . '/../tests/smoke.conf.php';
  56. require_once SWEETY_HOME . '/lib/yaymock/yay_mock.php';
  57. require_once SWEETY_HOME . '/lib/yaymock/yay_convenience.php';