Skip to content

Preserve and reset user roles and capabilities between test runs #828

@srtfisher

Description

@srtfisher

Continuing from #826...

Mantle is currently taking too aggressive of a stance when cleaning up between test runs. Right now, it resets all meta keys in the tear down for each test run. This can cause issues when attempting to use meta that was registered on init before the test case even started.

We should make it possible to reset the $wp_roles global between test runs. The global should be backed up before any test begins and then restored at the start of each run.

This should be an opt-in feature and not something included with the framework by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions