WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 10 months ago

#37405 closed task (blessed) (fixed)

Capability tests for non-logged-in users

Reported by: johnbillion Owned by: johnbillion
Milestone: 4.6 Priority: low
Severity: normal Version:
Component: Role/Capability Keywords: has-unit-tests
Focuses: Cc:

Description

In Tests_User_Capabilities we have comprehensive tests for all user roles, but none for non-logged-in users.

While it might seem obvious that a non-logged-in user cannot have any capabilities, having tests to ensure this will help protect us with regard to any future refactoring of authentication code.

Attachments (1)

37405.patch (593 bytes) - added by johnbillion 20 months ago.

Download all attachments as: .zip

Change History (4)

@johnbillion
20 months ago

#1 @johnbillion
20 months ago

  • Keywords has-unit-tests added

#2 @johnbillion
20 months ago

  • Owner set to johnbillion
  • Resolution set to fixed
  • Status changed from new to closed

In 38096:

Role/Capability: Introduce capability tests for non-logged-in users.

Fixes #37405

#3 @johnbillion
10 months ago

In 40563:

Users: Add two missing special cases to the capability tests for non-logged-in users.

Also updates a expectedIncorrectUsage notation.

See #37405

Note: See TracTickets for help on using tickets.