fix(tests): add wp_parse_url mock to OpenRouter tests
Both the provider and validator call wp_parse_url() for host extraction. Tests were missing the Brain Monkey stub. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,9 @@ class OpenRouterProviderTest extends BaseTestCase {
|
||||
);
|
||||
Functions\when( 'set_transient' )->justReturn( true );
|
||||
|
||||
// Stub URL parsing.
|
||||
Functions\when( 'wp_parse_url' )->alias( 'parse_url' );
|
||||
|
||||
// Stub HTTP functions for API calls.
|
||||
Functions\when( 'wp_remote_post' )->justReturn( [
|
||||
'body' => '{"choices":[{"message":{"content":"test"},"finish_reason":"stop"}],"usage":{"prompt_tokens":10,"completion_tokens":5,"total_tokens":15}}',
|
||||
|
||||
Reference in New Issue
Block a user