Changeset 46650 for trunk/tests/phpunit/tests/user.php
- Timestamp:
- 11/04/2019 03:04:41 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/user.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user.php
r46643 r46650 36 36 self::$user_ids[] = self::$contrib_id; 37 37 38 self::$user_ids[] = $factory->user->create(39 array(40 'user_login' => "testemailaddress'@test.com",41 'user_nicename' => 'user_email_with_apostrophe',42 'user_pass' => 'password',43 'first_name' => 'John',44 'last_name' => 'Doe',45 'display_name' => 'John Doe',46 'user_email' => "testemailaddress'@test.com",47 'user_url' => 'http://tacos.com',48 'role' => 'contributor',49 'nickname' => 'Johnny',50 'description' => 'I am a WordPress user that cares about privacy.',51 )52 );53 54 38 self::$author_id = $factory->user->create( 55 39 array( … … 65 49 self::$editor_id = $factory->user->create( 66 50 array( 51 'user_email' => 'test@test.com', 67 52 'role' => 'editor', 68 'user_email' => 'test@test.com',69 53 ) 70 54 ); … … 80 64 81 65 $this->author = clone self::$_author; 82 }83 84 public function test_that_you_can_login_with_an_email_that_has_apostrophe() {85 86 // Create the user with an email that has an apostrophe (see test setup).87 88 // Login as the user.89 $credentials = [90 'user_login' => "testemailaddress'@test.com",91 'user_password' => 'password',92 ];93 94 // Attempt to login.95 $user = wp_signon( $credentials );96 97 // Assert that the login was successfull.98 // If the login fails, an instance of WP_Error is returned rather than User object.99 $this->assertNotWPError( $user );100 66 } 101 67
Note: See TracChangeset
for help on using the changeset viewer.