Files
WP-Acorn-Starter/tests/bootstrap.php
T
2026-06-29 19:54:12 +02:00

16 lines
471 B
PHP

<?php
declare(strict_types=1);
/*
* WordPress isn't loaded in unit tests. Define ABSPATH as insurance so any code
* that transitively pulls in a file guarded by `defined('ABSPATH') || exit;`
* fails loudly instead of vanishing mid-load. BootCoordinator itself needs no WP
* constants — Brain\Monkey mocks did_action()/do_action() per test.
*/
if (! defined('ABSPATH')) {
define('ABSPATH', __DIR__ . '/');
}
require_once __DIR__ . '/../vendor/autoload.php';