Real WordPress behavior
Use selected core formatting, sanitization, URL, hook, REST, and utility code.
Real WordPress functions and classes in fast, isolated PHPUnit tests.
Choose the package line that matches your WordPress version:
composer require --dev doiftrue/unitest-wp-copy:7.1.*
composer require --dev 10up/wp_mockInitialize the runtime before WP_Mock:
require_once dirname( __DIR__ ) . '/vendor/autoload.php';
\Unitest_WP_Copy\WP_Runtime::boot();
\WP_Mock::bootstrap();