SLIC (StellarWP Local Interactive Containers) is used for running tests in this project.
-
Follow the slic documentation to install and set up SLIC.
-
Install the required theme:
slic wp theme install kadence
Run the WordPress unit tests:
slic run tests/wpunitRun the CLI integration tests:
slic run tests/cli_integrationThese tests verify the WP-CLI commands (list, run, rollback, executions, logs) work correctly.
Run all test suites:
slic runtests/wpunit/- WordPress unit tests for core functionalitytests/cli_integration/- CLI integration tests using Codeception CEST formattests/_support/Helper/Migrations/- Test migration classestests/_data/test-plugin/- Test plugin for CLI integration tests
The CLI integration tests use snapshot testing for output verification. Snapshots are stored in tests/cli_integration/__snapshots__/.
To update snapshots after intentional changes:
- Delete the relevant snapshot file(s)
- Re-run the tests
- New snapshots will be created automatically