mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Build/Test Tools: Add unit tests for wp_set_password hook.
Follow-up to [55056]. Props audrasjb, SergeyBiryukov, costdev. Fixes #57436. git-svn-id: https://develop.svn.wordpress.org/trunk@55250 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e146f22ddf
commit
face5a97dd
@ -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
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user