Make WordPress Core

Ticket #39360: 39360-tests.2.diff

File 39360-tests.2.diff, 632 bytes (added by xknown, 8 years ago)

Simpler test

  • tests/phpunit/tests/mail.php

    diff --git a/tests/phpunit/tests/mail.php b/tests/phpunit/tests/mail.php
    index 1522594..1a3fffc 100644
    a b class Tests_Mail extends WP_UnitTestCase { 
    392392                $this->assertEquals( 'wp_mail_failed', $call_args[0]->get_error_code() );
    393393                $this->assertEquals( $expected_error_data, $call_args[0]->get_error_data() );
    394394        }
     395
     396        /**
     397         * @ticket 39360
     398         */
     399        public function test_wpmail_invalid_from_address_should_not_throw_exception() {
     400                $_SERVER['SERVER_NAME'] = '_';
     401                $to = 'user@example.org';
     402
     403                wp_mail( $to, 'Testing', 'Test Message' );
     404        }
    395405}