Skip to content

Commit

Permalink
Load speed trap listener clas
Browse files Browse the repository at this point in the history
Fixes #12
  • Loading branch information
JDGrimes committed Nov 4, 2016
1 parent c4f82d9 commit c7f4c33
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/WPPPB/Loader.php
Expand Up @@ -262,12 +262,25 @@ public function running_uninstall_tests() {
*/
public function load_wordpress() {

$wp_tests_dir = $this->get_wp_tests_dir();

/**
* Sets up the WordPress test environment.
*
* @since 0.2.0
*/
require( $this->get_wp_tests_dir() . '/includes/bootstrap.php' );
require( $wp_tests_dir . '/includes/bootstrap.php' );

// The listener is not loaded by default. It was added in WordPress 4.4.
if ( file_exists( $wp_tests_dir . '/includes/speed-trap-listener.php' ) ) {

/**
* The speed trap listener from WordPress's test suite.
*
* @since 0.2.2
*/
require_once( $wp_tests_dir . '/includes/speed-trap-listener.php' );
}
}

//
Expand Down

0 comments on commit c7f4c33

Please sign in to comment.