diff --git a/core/modules/locale/src/Tests/LocaleStringIsSafeTest.php b/core/modules/locale/src/Tests/LocaleStringIsSafeTest.php index cc92756..d02651d 100644 --- a/core/modules/locale/src/Tests/LocaleStringIsSafeTest.php +++ b/core/modules/locale/src/Tests/LocaleStringIsSafeTest.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\locale\Tests\LocaleTranslationProjectsTest. + * Contains \Drupal\locale\Tests\LocaleStringIsSafeTest. */ namespace Drupal\locale\Tests; @@ -10,14 +10,16 @@ use Drupal\simpletest\KernelTestBase; /** - * Tests locale translation project handling. + * Tests locale translation safe string handling. * * @group locale */ class LocaleStringIsSafeTest extends KernelTestBase { /** - * {@inheritdoc} + * Modules to enable. + * + * @var array */ public static $modules = ['locale']; @@ -25,23 +27,23 @@ class LocaleStringIsSafeTest extends KernelTestBase { * Tests for locale_string_is_safe(). */ public function testLocaleStringIsSafe() { - // Translatable string without HTML. + // Check a translatable string without HTML. $string = 'Hello world!'; $result = locale_string_is_safe($string); $this->assertTrue($result); - // Translatable string including trustable HTML. + // Check a translatable string which includes trustable HTML. $string = 'Hello world!'; $result = locale_string_is_safe($string); $this->assertTrue($result); - // Untranslatable string including untrustable HTML (regarding to the - // locale_string_is_safe function definition). + // Check an untranslatable string which includes untrustable HTML (according + // to the locale_string_is_safe() function definition). $string = 'Hello world!'; $result = locale_string_is_safe($string); $this->assertFalse($result); - // Translatable string including token into an href attribute. + // Check a translatable string which includes a token in an href attribute. $string = 'Hi user'; $result = locale_string_is_safe($string); $this->assertTrue($result);