Make WordPress Core

Ticket #26836: ticket-26836-tests-mock-mailer.patch

File ticket-26836-tests-mock-mailer.patch, 593 bytes (added by bpetty, 10 years ago)
  • tests/phpunit/includes/install.php

    diff --git tests/phpunit/includes/install.php tests/phpunit/includes/install.php
    index b9480bc..82d5322 100644
    require_once ABSPATH . '/wp-settings.php'; 
    2222require_once ABSPATH . '/wp-admin/includes/upgrade.php';
    2323require_once ABSPATH . '/wp-includes/wp-db.php';
    2424
     25// Override the PHPMailer
     26global $phpmailer;
     27require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
     28$phpmailer = new MockPHPMailer();
     29
    2530$wpdb->query( 'SET storage_engine = INNODB' );
    2631$wpdb->select( DB_NAME, $wpdb->dbh );
    2732