From 42565b2e1fdcf5623fea1854c4649ef41c219735 Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Wed, 15 May 2024 13:43:03 -0300 Subject: [PATCH] add quotes test cases --- tests/CbtThemeLocale/escapeString.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/CbtThemeLocale/escapeString.php b/tests/CbtThemeLocale/escapeString.php index 0b5229ff..0bdf63eb 100644 --- a/tests/CbtThemeLocale/escapeString.php +++ b/tests/CbtThemeLocale/escapeString.php @@ -16,6 +16,18 @@ public function test_escape_string() { $this->assertEquals( "", $escaped_string ); } + public function test_escape_string_with_single_quote() { + $string = "This is a test text with a single quote '"; + $escaped_string = CBT_Theme_Locale::escape_string( $string ); + $this->assertEquals( "", $escaped_string ); + } + + public function test_escape_string_with_double_quote() { + $string = 'This is a test text with a double quote "'; + $escaped_string = CBT_Theme_Locale::escape_string( $string ); + $this->assertEquals( "", $escaped_string ); + } + public function test_escape_string_with_html() { $string = '

This is a test text with HTML.

'; $escaped_string = CBT_Theme_Locale::escape_string( $string );