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:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user