fix(tests): add wpdb->posts and wpdb->options to mock setup

AnalysisPromptsTest: analysis-prompts.php uses $wpdb->posts in the
JOIN clause ({->posts}); mock stdClass must declare posts property.

GenerationStatusPollerTest: Generation_Lock queries {->options}
in acquire/release/get_acquired_at; mock stdClass must declare options.

Agent-Session: prab-v0183-20260612
This commit is contained in:
peptiderepo
2026-06-12 03:18:10 +00:00
committed by peptiderepo
parent 1afac09d0a
commit eae0239b0c
2 changed files with 4 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ class GenerationStatusPollerTest extends BaseTestCase {
$this->lock_acquired_at = null;
$this->wpdb = $this->create_mock_wpdb();
// Generation_Lock uses $wpdb->options in acquire/release/get_acquired_at.
$this->wpdb->options = 'wp_options';
$GLOBALS['wpdb'] = $this->wpdb;
// Stub nonce check and capability check (always pass in unit tests).