11<?php
2-
32/**
4- * @group formatting
3+ * Tests for the sanitize_user() function.
54 *
5+ * @group formatting
66 * @covers ::sanitize_user
77 */
88class Tests_Formatting_SanitizeUser extends WP_UnitTestCase {
@@ -37,14 +37,13 @@ public function test_strips_encoded_ampersand_when_followed_by_semicolon() {
3737 $ this ->assertSame ( $ expected , sanitize_user ( 'AT&T Test; ' ) );
3838 }
3939
40- /*
40+ /**
4141 * Some languages use the Latin alphabet with various accents.
4242 * The city Münster is in Germany, Orléans is in France. This
4343 * test checks that an author (a user name) can use an accent.
4444 *
4545 * @ticket 31992
4646 */
47-
4847 public function test_strips_percent_encoded_octets () {
4948 if ( ! function_exists ( 'mb_str_split ' ) ) {
5049 $ this ->markTestSkipped ( 'PHP 7.2/3 lacks mb_str_split ' );
@@ -57,6 +56,13 @@ public function test_optional_strict_mode_reduces_to_safe_ascii_subset() {
5756 $ this ->assertSame ( 'abc ' , sanitize_user ( '()~ab~ˆcˆ! ' , true ) );
5857 }
5958
59+ /**
60+ * Arabic script is used in various languages, including
61+ * Arabic and Persian. This test checks that an author
62+ * (a user name) can use such letters.
63+ *
64+ * @ticket 31992
65+ */
6066 public function test_accepts_all_arabic () {
6167 if ( ! function_exists ( 'mb_str_split ' ) ) {
6268 $ this ->markTestSkipped ( 'PHP 7.2/3 lacks mb_str_split ' );
@@ -68,7 +74,7 @@ public function test_accepts_all_arabic() {
6874 $ this ->assertSame ( $ expected , sanitize_user ( $ encoded ) );
6975 }
7076
71- /*
77+ /**
7278 * Some languages use the Latin alphabet with various
7379 * extra letters. The city Bodø is in Norway, Gießen in
7480 * Germany. This test checks that an author (a user name) can
@@ -78,7 +84,6 @@ public function test_accepts_all_arabic() {
7884 *
7985 * @ticket 31992
8086 */
81-
8287 public function test_accepts_west_african_latin () {
8388 if ( ! function_exists ( 'mb_str_split ' ) ) {
8489 $ this ->markTestSkipped ( 'PHP 7.2/3 lacks mb_str_split ' );
0 commit comments