Changeset 1250 in tests for trunk/tests/auth.php
- Timestamp:
- 03/27/2013 02:09:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/auth.php
r909 r1250 42 42 $this->assertEquals( false, wp_validate_auth_cookie( $cookie, 'bar' ) ); 43 43 } 44 45 /* 46 * @ticket 23494 47 */ 48 function test_password_trimming() { 49 $another_user = $this->factory->user->create( array( 'user_login' => 'password-triming-tests' ) ); 50 51 $passwords_to_test = array( 52 'a password with no trailing or leading spaces', 53 'a password with trailing spaces ', 54 ' a password with leading spaces', 55 ' a password with trailing and leading spaces ', 56 ); 57 58 foreach( $passwords_to_test as $password_to_test ) { 59 wp_set_password( $password_to_test, $another_user ); 60 $authed_user = wp_authenticate( 'password-triming-tests', $password_to_test ); 61 62 $this->assertInstanceOf( 'WP_User', $authed_user ); 63 $this->assertEquals( $another_user, $authed_user->ID ); 64 } 65 } 44 66 }
Note: See TracChangeset
for help on using the changeset viewer.