Skip to content

Commit

Permalink
add mock methods
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Jul 27, 2023
1 parent 93c4bae commit c50aec2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/doubles/WPCoreFunctionsMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,25 @@ function __( $message ) {
function esc_url( $url ) {
return $url;
}

/**
* Mock for sanitize_text_field.
*
* @param string $text The text to be sanitize.
*
* @return string The text that was sanitized.
*/
function sanitize_text_field( $text ) {
return $text;
}

/**
* Mock for wp_unslash.
*
* @param string $string The string to be wp_unslash.
*
* @return string The string that was unslashed.
*/
function wp_unslash( $string ) {
return $string;
}

0 comments on commit c50aec2

Please sign in to comment.