[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/tests/phpunit/ -> bootstrap.php (source)

   1  <?php
   2  
   3  if ( defined( 'BP_USE_WP_ENV_TESTS' ) ) {
   4      // wp-env setup.
   5      define( 'WP_TESTS_CONFIG_FILE_PATH', dirname( __FILE__ ) . '/assets/phpunit-wp-config.php' );
   6      define( 'WP_TESTS_CONFIG_PATH', WP_TESTS_CONFIG_FILE_PATH );
   7  
   8      // Use WP PHPUnit.
   9      require_once dirname( dirname( dirname( __FILE__ ) ) ) . '/vendor/wp-phpunit/wp-phpunit/__loaded.php';
  10  }
  11  
  12  require( dirname( __FILE__ ) . '/includes/define-constants.php' );
  13  
  14  if ( ! file_exists( WP_TESTS_DIR . '/includes/functions.php' ) ) {
  15      die( "The WordPress PHPUnit test suite could not be found.\n" );
  16  }
  17  
  18  require_once WP_TESTS_DIR . '/includes/functions.php';
  19  
  20  function _install_and_load_buddypress() {
  21      require  BP_TESTS_DIR . '/includes/loader.php';
  22  }
  23  tests_add_filter( 'muplugins_loaded', '_install_and_load_buddypress' );
  24  
  25  require WP_TESTS_DIR . '/includes/bootstrap.php';
  26  
  27  // Load the BP-specific testing tools
  28  require  BP_TESTS_DIR . '/includes/testcase.php';
  29  require  BP_TESTS_DIR . '/includes/testcase-emails.php';


Generated: Tue Apr 23 01:01:07 2024 Cross-referenced by PHPXref 0.7.1