wp-self-test: REST routes and abilities

Read from the source of wp-self-test at v2.2.5.

REST routes

GET

/wp-json/mmwp/v1/self-test/cases

Namespace mmwp/v1, route /self-test/cases

Permission: Callback check_permission().

Arguments of /wp-json/mmwp/v1/self-test/cases
ArgumentTypeRequiredDefaultDescription
ids array [] Case ids from the registered manifests. Empty for every case.
plugin string '' Restrict to the cases of one registered plugin slug.

Registered in src/Surfaces/Rest.php#L87(opens in a new tab).

GET

/wp-json/mmwp/v1/self-test/preview

Namespace mmwp/v1, route /self-test/preview

Permission: Callback check_permission().

Arguments of /wp-json/mmwp/v1/self-test/preview
ArgumentTypeRequiredDefaultDescription
ids array [] Case ids from the registered manifests. Empty for every case.
plugin string '' Restrict to the cases of one registered plugin slug.

Registered in src/Surfaces/Rest.php#L94(opens in a new tab).

POST

/wp-json/mmwp/v1/self-test/run

Namespace mmwp/v1, route /self-test/run

Permission: Callback check_permission().

Arguments of /wp-json/mmwp/v1/self-test/run
ArgumentTypeRequiredDefaultDescription
ids array [] Case ids from the registered manifests. Empty for every case.
plugin string '' Restrict to the cases of one registered plugin slug.
cleanup boolean false Remove the test data right after each case instead of keeping it for "Remove test data".
layer string '' Run only the cases declaring this layer (rest, cli, ability, core, browser).

Registered in src/Surfaces/Rest.php#L101(opens in a new tab).

POST

/wp-json/mmwp/v1/self-test/cleanup

Namespace mmwp/v1, route /self-test/cleanup

Permission: Callback check_permission().

Arguments of /wp-json/mmwp/v1/self-test/cleanup
ArgumentTypeRequiredDefaultDescription
ids array [] Case ids from the registered manifests. Empty for every case.
plugin string '' Restrict to the cases of one registered plugin slug.

Registered in src/Surfaces/Rest.php#L125(opens in a new tab).

Abilities

Registered with the WordPress Abilities API (wp_register_ability()).