Make WordPress Core


Ignore:
Timestamp:
06/18/2015 01:52:29 PM (10 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/mail.php

    r32070 r32839  
    77    function setUp() {
    88        parent::setUp();
    9         $_SERVER['SERVER_NAME'] = 'example.com';
    109        unset( $GLOBALS['phpmailer']->mock_sent );
    11     }
    12 
    13     function tearDown() {
    14         unset( $_SERVER['SERVER_NAME'] );
    15         parent::tearDown();
    1610    }
    1711
Note: See TracChangeset for help on using the changeset viewer.