Skip to content

Commit

Permalink
Add back unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jffng committed Sep 10, 2024
1 parent 5ecc912 commit bdf39dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/CbtThemeLocale/escapeTextContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ public function test_escape_text_content_with_inner_html() {
$expected_output = "<?php\n/* Translators: %s are html tags */\necho sprintf( esc_html__( '%sThis is a test text with %sHTML%s.%s', '" . wp_get_theme()->get( 'TextDomain' ) . "' ), '<p>', '<strong>', '</strong>', '</p>'); ?>";
$this->assertEquals( $expected_output, $escaped_string );
}

public function test_escape_text_content_with_non_string() {
$string = null;
$escaped_string = $this->call_private_method( 'escape_text_content', array( $string ) );
$this->assertEquals( $string, $escaped_string );
}
}

0 comments on commit bdf39dd

Please sign in to comment.