wp_mail(): Lame Test
- So, make a unit test
-
But it calls
wp_mail()
- But how do we know it really worked?
class LoginTest extends TestCase { public function test_notify_login() { // Call the plugin's method that generates the mail. $actual = self::$o->notify_login($this->user_name); $this->assertTrue($actual, 'Bad return value.'); } }