fix(tests): infinite recursion in ImagePromptBuilderTest

wp_strip_all_tags mock was aliased to call itself, causing
the PHPUnit process to hang until the runner timed out.
Replace with strip_tags() like other test files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
peptiderepo
2026-04-16 18:18:13 +07:00
parent 941fc96c53
commit 364d246863

View File

@@ -20,7 +20,7 @@ class ImagePromptBuilderTest extends BaseTestCase {
// Mock WordPress functions.
Functions\when( 'wp_strip_all_tags' )->alias( function ( $str ) {
return wp_strip_all_tags( $str );
return trim( strip_tags( $str ) );
} );
Functions\when( 'sanitize_text_field' )->returnArg();
Functions\when( 'get_option' )->alias( function ( $key, $default = false ) {