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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52800 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-02-25 14:08:53 +00:00
parent 391922e8b4
commit 0bc5d361c3

View File

@ -241,9 +241,9 @@ class Tests_Mail extends WP_UnitTestCase {
// Single site test runs.
add_filter( 'home_url', '__return_empty_string' );
$success = wp_mail( $to, $subject, $message );
$result = wp_mail( $to, $subject, $message );
$this->assertFalse( $success, 'wp_mail() should have returned false' );
$this->assertFalse( $result, 'wp_mail() should have returned false' );
$this->assertGreaterThan( 0, did_action( 'wp_mail_failed' ), 'wp_mail_failed action was not called' );
}