@@ -75,20 +75,22 @@ private function create_temp_icon_file( $contents, $extension = 'svg' ) {
7575 }
7676
7777 /**
78- * Provides valid namespaced icon names, including names that contain or
79- * start with digits, as well as underscores.
78+ * Provides valid namespaced icon names, including names that contain,
79+ * start or end with digits, as well as underscores and hyphens .
8080 *
8181 * @return array<string, array{0: string}>
8282 */
8383 public function data_valid_icon_names () {
8484 return array (
85- 'simple name ' => array ( 'test-collection/my-icon ' ),
86- 'digit at the start ' => array ( 'test-collection/1-icon ' ),
87- 'digit in the name ' => array ( 'test-collection/my-1-icon ' ),
88- 'digit at the end ' => array ( 'test-collection/icon1 ' ),
89- 'underscore in the name ' => array ( 'test-collection/my_icon ' ),
90- 'underscore at the end ' => array ( 'test-collection/my-icon_ ' ),
91- 'hyphen at the end ' => array ( 'test-collection/my-icon- ' ),
85+ 'single character ' => array ( 'test-collection/a ' ),
86+ 'simple name ' => array ( 'test-collection/icon ' ),
87+ 'digit at the start ' => array ( 'test-collection/1icon ' ),
88+ 'digit in the name ' => array ( 'test-collection/my1icon ' ),
89+ 'digit at the end ' => array ( 'test-collection/icon1 ' ),
90+ 'underscore in the name ' => array ( 'test-collection/my_icon ' ),
91+ 'hyphen in the name ' => array ( 'test-collection/my-icon ' ),
92+ 'digit adjacent to a hyphen ' => array ( 'test-collection/my-1-icon ' ),
93+ 'digit adjacent to an underscore ' => array ( 'test-collection/my_1_icon ' ),
9294 );
9395 }
9496
@@ -125,7 +127,9 @@ public function data_invalid_icon_names() {
125127 'uppercase in the name ' => array ( 'test-collection/my-Icon ' ),
126128 'uppercase at the end ' => array ( 'test-collection/my-iconX ' ),
127129 'underscore at the start ' => array ( 'test-collection/_my-icon ' ),
130+ 'underscore at the end ' => array ( 'test-collection/my-icon_ ' ),
128131 'hyphen at the start ' => array ( 'test-collection/-my-icon ' ),
132+ 'hyphen at the end ' => array ( 'test-collection/my-icon- ' ),
129133 );
130134 }
131135
0 commit comments