Build/Test: Update assertions in AtomParser_Parse_Test::test_parse_sets_handlers
Some checks failed
Coding Standards / PHP coding standards (push) Has been cancelled
Coding Standards / JavaScript coding standards (push) Has been cancelled
End-to-end Tests / Test with SCRIPT_DEBUG disabled (push) Has been cancelled
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Has been cancelled
JavaScript Tests / QUnit Tests (push) Has been cancelled
Performance Tests / Performance tests (push) Has been cancelled
Performance Tests / Performance tests (with memcached) (push) Has been cancelled
PHP Compatibility / Check PHP compatibility (push) Has been cancelled
PHPUnit Tests / PHP 7.2 (push) Has been cancelled
PHPUnit Tests / PHP 7.3 (push) Has been cancelled
PHPUnit Tests / PHP 7.4 (push) Has been cancelled
PHPUnit Tests / PHP 8.0 (push) Has been cancelled
PHPUnit Tests / PHP 8.1 (push) Has been cancelled
PHPUnit Tests / PHP 8.2 (push) Has been cancelled
PHPUnit Tests / PHP 8.3 (push) Has been cancelled
PHPUnit Tests / PHP 8.4 (push) Has been cancelled
Test Build Processes / Core running from build (push) Has been cancelled
Test Build Processes / Core running from src (push) Has been cancelled
Test Build Processes / Gutenberg running from build (push) Has been cancelled
Test Build Processes / Gutenberg running from src (push) Has been cancelled
Coding Standards / Slack Notifications (push) Has been cancelled
Coding Standards / Failed workflow tasks (push) Has been cancelled
End-to-end Tests / Slack Notifications (push) Has been cancelled
End-to-end Tests / Failed workflow tasks (push) Has been cancelled
JavaScript Tests / Slack Notifications (push) Has been cancelled
JavaScript Tests / Failed workflow tasks (push) Has been cancelled
Performance Tests / Slack Notifications (push) Has been cancelled
Performance Tests / Failed workflow tasks (push) Has been cancelled
PHP Compatibility / Slack Notifications (push) Has been cancelled
PHP Compatibility / Failed workflow tasks (push) Has been cancelled
PHPUnit Tests / Slack Notifications (push) Has been cancelled
PHPUnit Tests / Failed workflow tasks (push) Has been cancelled
Test Build Processes / Slack Notifications (push) Has been cancelled
Test Build Processes / Failed workflow tasks (push) Has been cancelled

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.


git-svn-id: https://develop.svn.wordpress.org/branches/6.7@59745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron Jorbin 2025-01-30 23:00:01 +00:00
parent 2b063ba614
commit 1c02e689d7

View File

@ -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' ) );
}
}