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:
@@ -30,6 +30,9 @@ class OpenRouterValidatorTest extends BaseTestCase {
|
||||
// Stub wp_salt for encryption.
|
||||
Functions\when( 'wp_salt' )->justReturn( 'test_salt_key_for_unit_tests' );
|
||||
|
||||
// Stub URL parsing.
|
||||
Functions\when( 'wp_parse_url' )->alias( 'parse_url' );
|
||||
|
||||
// Stub HTTP functions.
|
||||
Functions\when( 'wp_remote_get' )->justReturn( [
|
||||
'body' => '{}',
|
||||
|
||||
Reference in New Issue
Block a user