Skip to content

Commit 3596cc0

Browse files
t-hamanoclaude
andcommitted
Tests: Add ticket references to the icon keyword tests.
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8087236 commit 3596cc0

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎tests/phpunit/tests/icons/wpIconsRegistry.php‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ public function test_register_rejects_non_boolean_public_property() {
545545

546546
/**
547547
* Should register an icon that provides a valid `keywords` array.
548+
*
549+
* @ticket 66158
548550
*/
549551
public function test_register_icon_with_keywords() {
550552
$name = 'test-collection/with-keywords';
@@ -566,6 +568,8 @@ public function test_register_icon_with_keywords() {
566568

567569
/**
568570
* Should register an icon that omits `keywords`, since the property is optional.
571+
*
572+
* @ticket 66158
569573
*/
570574
public function test_register_icon_without_keywords() {
571575
$name = 'test-collection/without-keywords';
@@ -604,6 +608,8 @@ public function data_invalid_keywords() {
604608
/**
605609
* Should fail to register an icon whose `keywords` is not an array of strings.
606610
*
611+
* @ticket 66158
612+
*
607613
* @dataProvider data_invalid_keywords
608614
* @expectedIncorrectUsage WP_Icons_Registry::register
609615
*
@@ -627,6 +633,8 @@ public function test_register_icon_with_invalid_keywords( $keywords ) {
627633

628634
/**
629635
* Should match an icon by keyword when neither its name nor its label match.
636+
*
637+
* @ticket 66158
630638
*/
631639
public function test_get_registered_icons_matches_keywords() {
632640
$this->registry->register(
@@ -669,6 +677,8 @@ public function test_get_registered_icons_matches_keywords() {
669677

670678
/**
671679
* Should match keywords case-insensitively, as names and labels are.
680+
*
681+
* @ticket 66158
672682
*/
673683
public function test_get_registered_icons_matches_keywords_case_insensitively() {
674684
$this->registry->register(

‎tests/phpunit/tests/icons/wpRestIconsController.php‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ public function test_get_items_search_includes_label() {
407407

408408
/**
409409
* Test that GET /wp/v2/icons/?search=%s searches icon keywords too.
410+
*
411+
* @ticket 66158
410412
*/
411413
public function test_get_items_search_includes_keywords() {
412414
wp_register_icon_collection( 'rest-test-collection', array( 'label' => 'REST Test' ) );
@@ -453,6 +455,8 @@ public function test_get_items_search_includes_keywords() {
453455
/**
454456
* Test that the response exposes an icon's keywords, so that clients which
455457
* filter icons locally can match against them.
458+
*
459+
* @ticket 66158
456460
*/
457461
public function test_get_items_response_includes_keywords() {
458462
wp_register_icon_collection( 'rest-test-collection', array( 'label' => 'REST Test' ) );
@@ -485,6 +489,8 @@ public function test_get_items_response_includes_keywords() {
485489
/**
486490
* Test that icons registered without keywords still expose an empty array,
487491
* so consumers do not have to handle a missing field.
492+
*
493+
* @ticket 66158
488494
*/
489495
public function test_get_items_response_keywords_defaults_to_empty_array() {
490496
wp_set_current_user( self::$editor_id );

0 commit comments

Comments
 (0)