Changeset 36617 for trunk/tests/phpunit/tests/auth.php
- Timestamp:
- 02/22/2016 11:14:27 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/auth.php
r35224 r36617 312 312 $this->assertInstanceOf( 'WP_Error', $check ); 313 313 } 314 315 /** 316 * Ensure users can log in using both their username and their email address. 317 * 318 * @ticket 9568 319 */ 320 function test_log_in_using_email() { 321 $user_args = array( 322 'user_login' => 'johndoe', 323 'user_email' => 'mail@example.com', 324 'user_pass' => 'password', 325 ); 326 $this->factory->user->create( $user_args ); 327 328 $this->assertInstanceOf( 'WP_User', wp_authenticate( $user_args['user_email'], $user_args['user_pass'] ) ); 329 $this->assertInstanceOf( 'WP_User', wp_authenticate( $user_args['user_login'], $user_args['user_pass'] ) ); 330 } 314 331 }
Note: See TracChangeset
for help on using the changeset viewer.