Make WordPress Core

Changeset 64398


Ignore:
Timestamp:
10/16/2026 04:48:28 PM (27 hours ago)
Author:
lancewillett
Message:

Tests: Clarify category checklist walker assertion messages.

Describe tag order rather than nesting in two Walker_Category_Checklist assertion messages, matching what WP_HTML_Tag_Processor::next_tag() verifies. Leave the assertions unchanged.

Follow-up to [64381].

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/14315

Props huzaifaalmesbah.
See #65819.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/walkerCategoryChecklist.php

    r64381 r64398  
    173173                $this->assertSame( $li_class, $processor->get_attribute( 'class' ), 'The list item class did not match.' );
    174174
    175                 $this->assertTrue( $processor->next_tag( 'LABEL' ), 'The list item should contain a label.' );
     175                $this->assertTrue( $processor->next_tag( 'LABEL' ), 'A label should follow the list item opening tag.' );
    176176                $this->assertSame( 'selectit', $processor->get_attribute( 'class' ), 'The label class did not match.' );
    177177
    178                 $this->assertTrue( $processor->next_tag( 'INPUT' ), 'The label should contain an input.' );
     178                $this->assertTrue( $processor->next_tag( 'INPUT' ), 'An input should follow the label opening tag.' );
    179179                $this->assertSame( 'checkbox', $processor->get_attribute( 'type' ), 'The input should be a checkbox.' );
    180180                $this->assertSame( '5', $processor->get_attribute( 'value' ), 'The checkbox value should be the term ID.' );
Note: See TracChangeset for help on using the changeset viewer.