Make WordPress Core

Changeset 52800


Ignore:
Timestamp:
02/25/2022 02:08:53 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Rename the $success variable to $result in the wp_mail() test for an empty home URL.

The previously name could be a bit confusing if the function is expected to fail.

Follow-up to [52799].

See #54730.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/mail.php

    r52799 r52800  
    242242        add_filter( 'home_url', '__return_empty_string' );
    243243
    244         $success = wp_mail( $to, $subject, $message );
    245 
    246         $this->assertFalse( $success, 'wp_mail() should have returned false' );
     244        $result = wp_mail( $to, $subject, $message );
     245
     246        $this->assertFalse( $result, 'wp_mail() should have returned false' );
    247247        $this->assertGreaterThan( 0, did_action( 'wp_mail_failed' ), 'wp_mail_failed action was not called' );
    248248    }
Note: See TracChangeset for help on using the changeset viewer.