The fastest way to load pages in WordPress https://habd.as/code/hyperdrive/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap.php 585B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * PHPUnit bootstrap file
  4. *
  5. * @package Hyperdrive
  6. */
  7. $_tests_dir = getenv( 'WP_TESTS_DIR' );
  8. if ( ! $_tests_dir ) {
  9. $_tests_dir = '/tmp/wordpress-tests-lib';
  10. }
  11. // Give access to tests_add_filter() function.
  12. require_once $_tests_dir . '/includes/functions.php';
  13. /**
  14. * Manually load the plugin being tested.
  15. */
  16. function _manually_load_plugin() {
  17. require dirname( dirname( __FILE__ ) ) . '/src/hyperdrive.php';
  18. }
  19. tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
  20. // Start up the WP testing environment.
  21. require $_tests_dir . '/includes/bootstrap.php';