Docs
Types

Fixture

The serializable test layer, seed data plus the plugins it depends on.

A Fixture is the serializable test layer an extension ships alongside its live code: a seed function that creates known records over the typed WordPress client, plus the plugins that content depends on. Author one with defineFixture, then hand it to a config's dev/test stacks.

Prop

Type

Seed context

seed and cleanup receive a context with the typed WordPress client and the ids of the seeded users:

Prop

Type

seed returns a record of handles (ids, codes, or slugs of what it created) stored under the fixture's name so a test can read them back and re-fetch the live resource. Return handles, not full snapshots, which would drift from WordPress state.

On this page