[wp-trac] [WordPress Trac] #38266: Tests: Use assertSame() when the type of the value in the assertion is important
WordPress Trac
noreply at wordpress.org
Sat Sep 26 03:12:37 UTC 2020
#38266: Tests: Use assertSame() when the type of the value in the assertion is
important
-----------------------------------+-----------------------------
Reporter: johnbillion | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.6
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests php8 | Focuses:
-----------------------------------+-----------------------------
Comment (by SergeyBiryukov):
In [changeset:"49051" 49051]:
{{{
#!CommitTicketReference repository="" revision="49051"
Tests: Correct assertion in
`WP_Test_REST_Comments_Controller::check_comment_data()`.
`author_avatar_urls` should be present in the comment data array keys, not
values.
The test only passed accidentally due to `assertContains()` not performing
a strict type check.
See #38266, #50913.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38266#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list