Make WordPress Core

Changeset 54702


Ignore:
Timestamp:
10/27/2022 03:21:47 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Tests: Move wp_mail() tests to the pluggable directory.

This aims to bring some consistency with other pluggable function tests.

Includes moving the @covers tag from a single test method to the class DocBlock.

Follow-up to [221/tests], [909/tests], [54529].

See #56793.

Location:
trunk/tests/phpunit/tests/pluggable
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/pluggable/wpMail.php

    r54701 r54702  
    33 * @group pluggable
    44 * @group mail
     5 *
     6 * @covers ::wp_mail
    57 */
    6 class Tests_Mail extends WP_UnitTestCase {
     8class Tests_Pluggable_wpMail extends WP_UnitTestCase {
    79    public function set_up() {
    810        parent::set_up();
     
    479481    /**
    480482     * Tests that AltBody is reset between each wp_mail call.
    481      *
    482      * @covers :wp_mail
    483483     */
    484484    public function test_wp_mail_resets_properties() {
     
    486486            $phpmailer->AltBody = 'user1';
    487487        };
     488
    488489        add_action( 'phpmailer_init', $wp_mail_set_text_message );
    489490        wp_mail( 'user1@example.localhost', 'Test 1', '<p>demo</p>', 'Content-Type: text/html' );
    490491        remove_action( 'phpmailer_init', $wp_mail_set_text_message );
     492
    491493        wp_mail( 'user2@example.localhost', 'Test 2', 'test2' );
     494
    492495        $phpmailer = $GLOBALS['phpmailer'];
    493496        $this->assertNotSame( 'user1', $phpmailer->AltBody );
  • trunk/tests/phpunit/tests/pluggable/wpRand.php

    r53479 r54702  
    33/**
    44 * @group pluggable
     5 *
    56 * @covers ::wp_rand
    67 */
Note: See TracChangeset for help on using the changeset viewer.