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:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user