fix: add missing WordPress function stubs to unit tests
- ContentAnalyzerTest: pass Cost_Tracker as 2nd constructor arg - IdeaScorerTest: stub get_option for topic_exclusions - CostTrackerTest: stub get_option for monthly_budget_usd - OpenRouterPricingTest: stub get_transient with cached model data - OpenRouterProviderTest: stub get_option for API key + get_transient Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,15 @@ use Brain\Monkey\Functions;
|
||||
|
||||
class IdeaScorerTest extends BaseTestCase {
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
// IdeaScorer::score_and_rank() calls get_option('prautoblogger_topic_exclusions', '[]').
|
||||
$this->stub_get_option( [
|
||||
'prautoblogger_topic_exclusions' => '[]',
|
||||
] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Idea Scorer can be instantiated.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user