BaseTestCase::create_mock_wpdb() only adds methods [prepare, get_var, get_results, insert, query, get_row, update] — the reaper and amortize_research_costs also call `delete` and `get_col`, which the default mock can't stub. CI on PR #100 fired all five new ResearchReaperTest cases as errors at the first `->method('delete')` call during setUp. Fix: build a bespoke $wpdb mock in this file's setUp with the full superset of methods it needs. Self-contained; no change to BaseTestCase so existing tests aren't affected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9.0 KiB
9.0 KiB