WordPress / WordPress/create-block-theme

Update PHP tests to follow WP core conventions.

Open
#666 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

What?

Update PHP tests to follow WP core conventions.
Reference docs: https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#test-classes
Reference source: https://github.com/WordPress/wordpress-develop/tree/trunk/tests/phpunit/tests/blocks

Why?

Some of the plugin tests in the plugin don't follow that convention.

Expected

All tests should follow the same convention.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the plugin's PHP tests and compare their test classes with the WordPress testing handbook and the reference tests under tests/phpunit/tests/blocks. Identify the tests that do not follow the referenced convention, then confirm that all plugin tests use the same convention.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.