fix(admin): load delegate classes from orchestrator + add WP stubs for tests
The admin refactor split introduced delegate classes that the orchestrator instantiates in its constructor. CI failed because tests require the orchestrator directly without going through the plugin loader. Fix: add require_once for all delegate files at the top of the orchestrator, and add missing WP function stubs to the test bootstrap. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,16 @@ declare( strict_types=1 );
|
||||
* @see Peptide_News_Admin_Settings_Page — Settings page + log viewer
|
||||
* @see Peptide_News_Admin_Dashboard_Pages — Dashboard/articles/costs pages
|
||||
*/
|
||||
|
||||
// Load delegate classes that this orchestrator depends on.
|
||||
require_once __DIR__ . '/class-pn-admin-assets.php';
|
||||
require_once __DIR__ . '/class-pn-admin-menu.php';
|
||||
require_once __DIR__ . '/class-pn-admin-field-renderers.php';
|
||||
require_once __DIR__ . '/class-pn-admin-settings.php';
|
||||
require_once __DIR__ . '/class-pn-admin-log-viewer.php';
|
||||
require_once __DIR__ . '/class-pn-admin-settings-page.php';
|
||||
require_once __DIR__ . '/class-pn-admin-dashboard-pages.php';
|
||||
|
||||
class Peptide_News_Admin {
|
||||
|
||||
/** @var string Plugin name/slug */
|
||||
|
||||
Reference in New Issue
Block a user