Changeset 11885 for trunk/tests/phpunit/includes/loader.php
- Timestamp:
- 03/05/2018 12:00:25 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/loader.php
r11882 r11885 17 17 } 18 18 tests_add_filter( 'bp_send_email_delivery_class', '_bp_mock_mailer' ); 19 20 /** 21 * Load up activity action and screen code. 22 * 23 * In BuddyPress, this is loaded conditionally, but PHPUnit needs all files 24 * loaded at the same time to prevent weird load order issues. 25 */ 26 add_action( 'bp_activity_includes', function() { 27 $dirs = array( 28 buddypress()->plugin_dir . 'bp-activity/actions/', 29 buddypress()->plugin_dir . 'bp-activity/screens/', 30 ); 31 32 foreach ( $dirs as $dir ) { 33 foreach ( glob( $dir . "*.php" ) as $file ) { 34 require $file; 35 } 36 } 37 } );
Note: See TracChangeset
for help on using the changeset viewer.