bootstrap.php 629 B

12345678910111213141516171819202122
  1. <?php
  2. $_tests_dir = getenv('WP_TESTS_DIR');
  3. if ( !$_tests_dir ) $_tests_dir = '/tmp/wordpress-tests-lib';
  4. require_once $_tests_dir . '/includes/functions.php';
  5. function _manually_load_plugin() {
  6. $plugins_dir = dirname( __FILE__ ).'/../../../plugins';
  7. $timber = $plugins_dir.'/timber/timber.php';
  8. if ( file_exists($timber) ) {
  9. require_once($timber);
  10. } else {
  11. $timber_library = $plugins_dir.'/timber-library/timber.php';
  12. if ( file_exists($timber_library) ) {
  13. require_once($timber_library);
  14. }
  15. }
  16. }
  17. tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
  18. require $_tests_dir . '/includes/bootstrap.php';