wp_mail(): Full Test
- Tell the test suite to expect mail from this method
- Call the plugin's method
- Verify the mail
class LoginTest extends TestCase { public function test_notify_login() { self::$mail_file_basename = __METHOD__; $actual = self::$o->notify_login($this->user_name); $this->assertTrue($actual, 'Bad return value.'); $this->check_mail_file(); } }