Skip to content

Update plugin-unit-tests.md - #357

Merged
schlessera merged 3 commits into
wp-cli:masterfrom
spicecadet:patch-3
May 14, 2021
Merged

schlessera merged 3 commits into
wp-cli:masterfrom
spicecadet:patch-3

Conversation

@spicecadet

Copy link
Copy Markdown
Contributor

Updated the title. Should the file name change as well?

Updated the title. Should the file name change as well?
@schlessera

Copy link
Copy Markdown
Member

The content of the page should be adapted as well. However, the file name can't change, as that is just how the tool is currently being used.

As this might be misleading (talking about integration tests and using "unit-tests" for them), there should be a small paragraph that explains why that is:

  • the scaffolding uses the WordPress Core "unit tests" that serve to unit-test WordPress Core
  • they are useful for testing plugins and themes as well, but if they are used in that way, it turns those tests into "integration tests" - they test the integration between a plugin/theme and WordPress Core. Proper unit tests for a plugin or theme would not load WordPress.

Added clarification on unit tests and integration tests. Let me know if this needs to move or change.
Comment thread plugin-unit-tests.md Outdated
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
@schlessera schlessera added this to the 2.5.0 milestone May 14, 2021
@schlessera
schlessera merged commit 9d9af59 into wp-cli:master May 14, 2021
schlessera added a commit that referenced this pull request Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants