test wc_sanitize_tooltip
This commit is contained in:
parent
bf1407a60d
commit
58f86eddf9
|
@ -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( '<script>alert();</script>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( '<script>alert();</script>cleaned' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue