[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
Tue Jan 26 02:15:36 UTC 2021
#38266: Tests: Use assertSame() when the type of the value in the assertion is
important
-----------------------------------+-----------------------------
Reporter: johnbillion | Owner: SergeyBiryukov
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 5.7
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests php8 | Focuses:
-----------------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:19 SergeyBiryukov]:
> In other cases, this points to minor bugs in core, e.g. using `ceil()`
for values that are documented as integers, but without explicitly casting
to `int`, results in them being of type `float` instead. This affects some
properties like `max_num_pages`, `max_pages`, `total_pages` in various
classes, or functions like `get_comment_pages_count()`,
`wp_embed_defaults()`, `get_oembed_response_data()`.
Related: #46346
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38266#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list