Changeset 46467
- Timestamp:
- 10/12/2019 03:08:56 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r46462 r46467 572 572 wp_destroy_current_session(); 573 573 wp_clear_auth_cookie(); 574 wp_set_current_user( 0 ); 574 575 575 576 /** -
trunk/tests/phpunit/tests/user/capabilities.php
r45607 r46467 1751 1751 */ 1752 1752 function test_cpt_with_page_capability_type() { 1753 1754 1753 register_post_type( 1755 1754 'page_capability', … … 1800 1799 } 1801 1800 1802 public function testNonLoggedInUsersHaveNoCapabilities() { 1803 1801 public function test_non_logged_in_users_have_no_capabilities() { 1804 1802 $this->assertFalse( is_user_logged_in() ); 1805 1803 … … 1817 1815 $this->assertFalse( current_user_can( 'do_not_allow' ), 'Non-logged-in user should not have the do_not_allow capability' ); 1818 1816 } 1817 1818 /** 1819 * @ticket 35488 1820 */ 1821 function test_wp_logout_should_clear_current_user() { 1822 $user_id = self::factory()->user->create(); 1823 wp_set_current_user( $user_id ); 1824 1825 wp_logout(); 1826 1827 $this->assertEquals( 0, get_current_user_id() ); 1828 1829 } 1830 1819 1831 1820 1832 protected $_role_test_wp_roles_role;
Note: See TracChangeset
for help on using the changeset viewer.