Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20845, comment 11


Ignore:
Timestamp:
10/08/2015 04:31:02 PM (11 years ago)
Author:
bobbingwide

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20845, comment 11

    initial v1  
    11I've added a new file which contains a test setting the user by name with ID=null.
     2and a test demonstrating that name is trumped by ID. e.g. wp_set_current_user( "admin", "bobbingwide" ); will return the "admin" user.
    23
    34There seems little point in adding tests for setting it by a numeric ID, since this is already implicit in many other tests.
    4 
    5 In the future, for completeness, there should be tests with non-null/0 values of both ID AND name; to demonstrate that name is trumped by ID. e.g. wp_set_current_user( "admin", "bobbingwide" ); will return the "admin" user.