WordPress.org

Make WordPress Core

Changeset 440 in tests


Ignore:
Timestamp:
09/19/11 14:22:46 (3 years ago)
Author:
westi
Message:

Old PHPMailer blindly accepts the address, the new one santizes it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_pluggable.php

    r439 r440  
    231231        wp_mail( $to, $subject, $message ); 
    232232 
    233         $this->assertEquals('<address@tld.com>', $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0]); 
     233        // Old PHPMailer blindly accepts the address, the new one santizes it 
     234        if ( version_compare( $GLOBALS['wp_version'], '3.1.9', '>' ) ) 
     235            $this->assertEquals('address@tld.com', $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0]); 
     236        else 
     237            $this->assertEquals('<address@tld.com>', $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0]); 
    234238        $this->assertEquals($message . "\n", $GLOBALS['phpmailer']->mock_sent[0]['body']); 
    235239        unset( $_SERVER['SERVER_NAME'] ); 
Note: See TracChangeset for help on using the changeset viewer.