Make WordPress Core

Changeset 59745 for branches/6.7


Ignore:
Timestamp:
01/30/2025 11:00:01 PM (3 months ago)
Author:
jorbin
Message:

Build/Test: Update assertions in AtomParser_Parse_Test::test_parse_sets_handlers

On some instances of Windows, the assertions seem to find additional nodes. As this test is just about verifying that the handlers get called, not about testing the functionality of the handlers, we can adjust the assertion to look for a minimum number of nodes rather than exact number.

Follow-up to [59062].

Reviewed by desrosj.
Merges [59739] to the 6.7 branch.

Props yogeshbhutkar, hellofromTonya, SergeyBiryukov, coquardcyr, jrf, benniledl, desrosj, jorbin.
Fixes #62110. See #62061.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/tests/phpunit/tests/atomlib/AtomParser_Parse_Test.php

    r59062 r59745  
    6969        $this->assertSame( 28, $atom->end_element_call_counter, sprintf( $msg, 'end_element' ) );
    7070        $this->assertSame( 2, $atom->start_ns_call_counter, sprintf( $msg, 'start_ns' ) );
    71         $this->assertSame( 0, $atom->end_ns_call_counter, sprintf( $msg, 'end_ns' ) );
    72         $this->assertSame( 57, $atom->cdata_call_counter, sprintf( $msg, 'cdata' ) );
    73         $this->assertSame( 2, $atom->default_call_counter, sprintf( $msg, '_default' ) );
     71        $this->assertGreaterThanOrEqual( 0, $atom->end_ns_call_counter, sprintf( $msg, 'end_ns' ) );
     72        $this->assertGreaterThanOrEqual( 57, $atom->cdata_call_counter, sprintf( $msg, 'cdata' ) );
     73        $this->assertGreaterThanOrEqual( 2, $atom->default_call_counter, sprintf( $msg, '_default' ) );
    7474    }
    7575}
Note: See TracChangeset for help on using the changeset viewer.