Make WordPress Core


Ignore:
Timestamp:
02/20/2020 05:04:42 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Fix the Travis CI build for the 3.9 branch.

Among other fixes, this backports [28943], [28961], [28964-28968], [28988], [29120], [29251], [29503], [29860], [29869], [29954], [30001], [30160], [30282], [30285], [30289-30291], [30513-30514], [30516-30521], [30523-30524], [30526], [30529-30530], [31253-31254], [31257-31259], [31622], [33374], [40255], [40257], [40259], [40269], [40271], [40446], [40449], [40457], [40604], [40538], [40833], [41082], [41303], [41306], [44993].

See #49485.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/tests/phpunit/tests/mail.php

    r32149 r47329  
    7070                $this->assertTrue(strpos($GLOBALS['phpmailer']->mock_sent[0]['header'], 'boundary="----=_Part_4892_25692638.1192452070893"') > 0);
    7171                $this->assertTrue(strpos($GLOBALS['phpmailer']->mock_sent[0]['header'], 'charset=') > 0);
    72         }
    73 
    74         /**
    75          * @ticket 15448
    76          */
    77         function test_wp_mail_plain_and_html() {
    78                 $to = 'user@example.com';
    79                 $subject = 'Test email with plain text and html versions';
    80                 $messages = array( 'text/plain' => 'Here is some plain text.',
    81                                            'text/html' =>'<html><head></head><body>Here is the HTML ;-)<body></html>' );
    82 
    83                 wp_mail( $to, $subject, $messages );
    84 
    85                 preg_match( '/boundary="(.*)"/', $GLOBALS['phpmailer']->mock_sent[0]['header'], $matches);
    86                 $boundry = $matches[1];
    87                 $body = '--' . $boundry . '
    88 Content-Type: text/plain; charset = "UTF-8"
    89 Content-Transfer-Encoding: 8bit
    90 
    91 Here is some plain text.
    92 
    93 
    94 --' . $boundry . '
    95 Content-Type: text/html; charset = "UTF-8"
    96 Content-Transfer-Encoding: 8bit
    97 
    98 <html><head></head><body>Here is the HTML ;-)<body></html>
    99 
    100 
    101 
    102 --' . $boundry . '--
    103 ';
    104                 // We need some better assertions here but these test the behaviour for now.
    105                 $this->assertEquals($body, $GLOBALS['phpmailer']->mock_sent[0]['body']);
    10672        }
    10773
Note: See TracChangeset for help on using the changeset viewer.