Ticket #11959: 11959.test.patch
File 11959.test.patch, 685 bytes (added by , 12 years ago) |
---|
-
tests/tests/user.php
636 636 // If this test fails, it will error out for calling the to_array() method on a non-object. 637 637 $this->assertInstanceOf( 'WP_Error', wp_update_user( array( 'ID' => $user_id ) ) ); 638 638 } 639 640 function test_username_exists() { 641 $user_login = 'foo' . rand( 1, 100 ); 642 $user_id = $this->factory->user->create( compact( 'user_login' ) ); 643 644 $this->assertEquals( $user_id, username_exists( $user_login ) ); 645 $this->assertNull( username_exists( 'this_should_not_exist' ) ); 646 } 647 639 648 }