8045afd81b
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root. see #25088. git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
27 lines
548 B
PHP
27 lines
548 B
PHP
<?php
|
|
require_once( ABSPATH . '/wp-includes/class-phpmailer.php' );
|
|
|
|
class MockPHPMailer extends PHPMailer {
|
|
var $mock_sent = array();
|
|
|
|
// override the Send function so it doesn't actually send anything
|
|
function Send() {
|
|
try {
|
|
if ( ! $this->PreSend() )
|
|
return false;
|
|
|
|
$this->mock_sent[] = array(
|
|
'to' => $this->to,
|
|
'cc' => $this->cc,
|
|
'bcc' => $this->bcc,
|
|
'header' => $this->MIMEHeader,
|
|
'body' => $this->MIMEBody,
|
|
);
|
|
|
|
return true;
|
|
} catch ( phpmailerException $e ) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|