diff --git a/tests/unit-tests/formatting/functions.php b/tests/unit-tests/formatting/functions.php index 262988158ee..b1c0ea1a48d 100644 --- a/tests/unit-tests/formatting/functions.php +++ b/tests/unit-tests/formatting/functions.php @@ -276,7 +276,18 @@ class Functions extends \WC_Unit_Test_Case { */ public function test_wc_clean() { - $this->assertInternalType( 'string', wc_clean( 'cleaned' ) ); + $this->assertEquals( 'cleaned', wc_clean( 'cleaned' ) ); + } + + /** + * Test wc_sanitize_tooltip() - note this is a basic type test as WP core already + * has coverage for wp_kses() + * + * @since 2.4 + */ + public function test_wc_sanitize_tooltip() { + + $this->assertEquals( 'alert();cleaned', wc_sanitize_tooltip( 'cleaned' ) ); } /**