alleyinteractive / alleyinteractive/mantle-framework

Preserve and reset user roles and capabilities between test runs

Aberta
#828 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
PHP
Estrelas
28
Forks
7
Merge médio
2d 4h
PRs com merge (30d)
2

Descrição

Continuing from https://github.com/alleyinteractive/mantle-framework/issues/826...

> Mantle is currently taking too aggressive of a stance when cleaning up between test runs. Right now, it [resets all meta keys](https://github.com/alleyinteractive/mantle-framework/blob/72bc20b307db22ec439b61250eeeb46e84682a5a/src/mantle/testing/TestCase.php#L274) 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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.