From 439b172d9268a0020e6624bb12d230210b2de9b9 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Thu, 30 Jan 2025 17:53:00 +0000 Subject: [PATCH] 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]. Props yogeshbhutkar, hellofromTonya, SergeyBiryukov, coquardcyr, jrf, benniledl, desrosj, jorbin. Fixes #62110. See #62061. git-svn-id: https://develop.svn.wordpress.org/trunk@59739 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/atomlib/AtomParser_Parse_Test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/atomlib/AtomParser_Parse_Test.php b/tests/phpunit/tests/atomlib/AtomParser_Parse_Test.php index 38ea2d0794..6c66b5e991 100644 --- a/tests/phpunit/tests/atomlib/AtomParser_Parse_Test.php +++ b/tests/phpunit/tests/atomlib/AtomParser_Parse_Test.php @@ -68,8 +68,8 @@ final class AtomParser_Parse_Test extends WP_UnitTestCase { $this->assertSame( 28, $atom->start_element_call_counter, sprintf( $msg, 'start_element' ) ); $this->assertSame( 28, $atom->end_element_call_counter, sprintf( $msg, 'end_element' ) ); $this->assertSame( 2, $atom->start_ns_call_counter, sprintf( $msg, 'start_ns' ) ); - $this->assertSame( 0, $atom->end_ns_call_counter, sprintf( $msg, 'end_ns' ) ); - $this->assertSame( 57, $atom->cdata_call_counter, sprintf( $msg, 'cdata' ) ); - $this->assertSame( 2, $atom->default_call_counter, sprintf( $msg, '_default' ) ); + $this->assertGreaterThanOrEqual( 0, $atom->end_ns_call_counter, sprintf( $msg, 'end_ns' ) ); + $this->assertGreaterThanOrEqual( 57, $atom->cdata_call_counter, sprintf( $msg, 'cdata' ) ); + $this->assertGreaterThanOrEqual( 2, $atom->default_call_counter, sprintf( $msg, '_default' ) ); } }