diff --git a/tests/phpunit/tests/auth.php b/tests/phpunit/tests/auth.php index 2198fadcd0..4aa1d882c6 100644 --- a/tests/phpunit/tests/auth.php +++ b/tests/phpunit/tests/auth.php @@ -100,6 +100,22 @@ class Tests_Auth extends WP_UnitTestCase { } } + /** + * Tests hooking into wp_set_password(). + * + * @ticket 57436 + * + * @covers ::wp_set_password + */ + public function test_wp_set_password_action() { + $action = new MockAction(); + + add_action( 'wp_set_password', array( $action, 'action' ) ); + wp_set_password( 'A simple password', self::$user_id ); + + $this->assertSame( 1, $action->get_call_count() ); + } + /** * Test wp_hash_password trims whitespace *