mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 07:36:58 +00:00
Make sure $_SERVER['SERVER_NAME'] is set whenever wp_mail() is called in PHPUnit tests.
This eliminates PHP notices when `wp_mail()` needs to determine its own From header. See [25381] for a previous fix, which focused only on the mail-specific tests. Fixes #32702. git-svn-id: https://develop.svn.wordpress.org/trunk@32839 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -6,15 +6,9 @@
|
||||
class Tests_Mail extends WP_UnitTestCase {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$_SERVER['SERVER_NAME'] = 'example.com';
|
||||
unset( $GLOBALS['phpmailer']->mock_sent );
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
unset( $_SERVER['SERVER_NAME'] );
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
function test_wp_mail_custom_boundaries() {
|
||||
$to = 'user@example.com';
|
||||
$subject = 'Test email with custom boundaries';
|
||||
|
||||
Reference in New Issue
Block a user