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
This commit is contained in:
Andrew Nacin 2014-01-14 21:55:41 +00:00
parent 3a1b1ba755
commit b807bea28c
1 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,11 @@ require_once ABSPATH . '/wp-settings.php';
require_once ABSPATH . '/wp-admin/includes/upgrade.php'; require_once ABSPATH . '/wp-admin/includes/upgrade.php';
require_once ABSPATH . '/wp-includes/wp-db.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->query( 'SET storage_engine = INNODB' );
$wpdb->select( DB_NAME, $wpdb->dbh ); $wpdb->select( DB_NAME, $wpdb->dbh );