Changeset 58653 for trunk/tests/phpunit/tests/auth.php
- Timestamp:
- 07/03/2024 04:08:55 PM (21 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/auth.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/auth.php
r58341 r58653 116 116 * 117 117 * @ticket 57436 118 * @ticket 61541 118 119 * 119 120 * @covers ::wp_set_password … … 122 123 $action = new MockAction(); 123 124 124 add_action( 'wp_set_password', array( $action, 'action' ) ); 125 wp_set_password( 'A simple password', self::$user_id ); 125 $previous_user_pass = get_user_by( 'id', $this->user->ID )->user_pass; 126 127 add_action( 'wp_set_password', array( $action, 'action' ), 10, 3 ); 128 wp_set_password( 'A simple password', $this->user->ID ); 126 129 127 130 $this->assertSame( 1, $action->get_call_count() ); 131 132 // Check that the old data passed through the hook is correct. 133 $this->assertSame( $previous_user_pass, $action->get_args()[0][2]->user_pass ); 128 134 } 129 135
Note: See TracChangeset
for help on using the changeset viewer.