Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/07/2015 12:35:06 PM (11 years ago)
Author:
netweb
Message:

Add support for BuddyPress PHPUnit test integration

  • Bootstrap and load /src/bbpress.php when loading the test environment
  • Detect and load BuddyPress when running the BuddyPress PHPUnit tests
  • Setup BP_UnitTest_Factory in BBP_UnitTestCase during new BuddyPress PHPUnit test integration
  • Bootstrap and load new factory class BBP_UnitTest_Factory_For_Forum for creating forums

Props boonebgorges. See #2782

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/define-constants.php

    r5610 r5673  
    5353    die( "wp-tests-config.php could not be found.\n" );
    5454}
     55
     56// Determine whether BuddyPress is present.
     57if ( ! defined( 'BP_TESTS_DIR' ) ) {
     58    $wp_content_dir = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) );
     59    if ( file_exists( $wp_content_dir . '/buddypress/tests/phpunit/bootstrap.php' ) ) {
     60        define( 'BP_TESTS_DIR', $wp_content_dir . '/buddypress/tests/phpunit' );
     61    }
     62}
Note: See TracChangeset for help on using the changeset viewer.