From b807bea28c84032a88c451ff8e96da288eaaecb3 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 14 Jan 2014 21:55:41 +0000 Subject: [PATCH] Test framework: Override PHPMailer during installation. props bpetty. fixes #26836. git-svn-id: https://develop.svn.wordpress.org/trunk@26944 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/install.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php index b9480bce60..82d53226a3 100644 --- a/tests/phpunit/includes/install.php +++ b/tests/phpunit/includes/install.php @@ -22,6 +22,11 @@ require_once ABSPATH . '/wp-settings.php'; require_once ABSPATH . '/wp-admin/includes/upgrade.php'; require_once ABSPATH . '/wp-includes/wp-db.php'; +// Override the PHPMailer +global $phpmailer; +require_once( dirname( __FILE__ ) . '/mock-mailer.php' ); +$phpmailer = new MockPHPMailer(); + $wpdb->query( 'SET storage_engine = INNODB' ); $wpdb->select( DB_NAME, $wpdb->dbh );