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:
peptiderepo
2026-04-16 20:55:03 +07:00
parent fcc61c0cb8
commit d31d378ec1
2 changed files with 6 additions and 0 deletions

View File

@@ -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' => '{}',