Skip to content

Fix failing PHP test in WP nightly #11628

@nfmohit

Description

@nfmohit

Bug Description

Due to a recent change in WordPress, one of our PHP tests has started failing in the nightly build.

It looks like the test case tries to mutate the roles property in the WP_User object, which has now been changed to a protected property.

We should use the provided class methods to set roles.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The failing test case highlighted in the issue description should be updated so that it passes in all PHP versions and WordPress builds.

Implementation Brief

Test Coverage

QA Brief

Changelog entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priorityType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions