Our great sponsors
-
bh-wp-bitcoin-gateway
Self-custody Bitcoin payment gateway for WooCommerce. Bitcoin is paid directly into your wallet. Transactions are verified using public APIs. No private keys are stored on the server. No account is needed with any third party.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
wp-phpunit
WordPress core PHPUnit library. [READ ONLY] Versions for new WordPress releases are built daily.
-
PHPUnit-Polyfills
Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
There is an effort called WP_Mock started by GoDaddy which attempts to mock the WordPress API, thus doing what I just accused the official version of testing of getting wrong. And this also feels wrong. Running tests against a mock of WordPress' API feels insufficient except for the simplest cases. Also if I'm not actually "testing against WordPress" I don't get the benefits of the official way, like being able to easy test against future and past versions of WordPress. I'm just testing against whatever version the mock attempts to replicate.
First and foremost - I prefer end to end testing with tools like cypress or phpunit+browserkit over integration testing with the core test suite you linked. If I do reach for the core test suite lately I like the wp-phpunit package instead of the script you get from the wp-cli scaffolding.
Check out brain monkey - it is my preferred mocking utility these days instead of WP_Mock.
Check out the phpunit-polyfills package. This is pretty much a must if you want to test much older wordpress and php versions.