From 364d2468631b29d4d754a32570ecf4c9409f608e Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Thu, 16 Apr 2026 18:18:13 +0700 Subject: [PATCH] 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 --- tests/unit/Core/ImagePromptBuilderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/Core/ImagePromptBuilderTest.php b/tests/unit/Core/ImagePromptBuilderTest.php index c900850..505e704 100644 --- a/tests/unit/Core/ImagePromptBuilderTest.php +++ b/tests/unit/Core/ImagePromptBuilderTest.php @@ -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 ) {