WordPress.org

Make WordPress Core

Ticket #23311: 23311.2-unit-tests.diff

File 23311.2-unit-tests.diff, 784 bytes (added by iandunn, 5 years ago)
  • tests/mail.php

     
    210210                $this->assertEquals($message . "\n", $GLOBALS['phpmailer']->mock_sent[0]['body']);
    211211                unset( $_SERVER['SERVER_NAME'] );
    212212        }
    213 }
     213
     214        /**
     215         * @ticket 23311
     216         */     
     217        function test_wp_phpmailer_error_message_keys_match()
     218        {
     219                require_once ABSPATH . WPINC . '/class-phpmailer.php';
     220                require_once ABSPATH . WPINC . '/class-wp-phpmailer.php';
     221               
     222                $phpmailer = new PHPMailer();
     223                $phpmailer->SetLanguage();
     224                $wp_phpmailer = new WP_PHPMailer();
     225                $this->assertTrue( array_keys( $phpmailer->GetTranslations() ) == array_keys( $wp_phpmailer->GetTranslations() ) );
     226        }
     227}
     228 No newline at end of file