Opened 5 months ago
Closed 5 months ago
#65186 closed enhancement (fixed)
Tests: Add unit tests for _customizer_mobile_viewport_meta()
| Reported by: | pbearne | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | tests |
Description (last modified by )
This ticket adds unit tests for the _customizer_mobile_viewport_meta() function in wp-admin/includes/misc.php. The tests will verify that the function correctly appends the mobile-specific viewport settings to the existing viewport meta string.
Change History (5)
#1
@
5 months ago
- Description modified (diff)
- Summary Tests: Add unit tests for extract_from_markers() → Tests: Add unit tests for _customizer_mobile_viewport_meta()
This ticket was mentioned in PR #11743 on WordPress/wordpress-develop by @pbearne.
5 months ago
#2
- Keywords has-patch has-unit-tests added
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Description:
This PR adds unit tests for the
_customizer_mobile_viewport_meta()function inwp-admin/includes/misc.php. These tests ensure that the function correctly appends Customizer-specific viewport settings (minimum-scale=0.5,maximum-scale=1.2) to an existing viewport meta string, while handling trailing commas and empty input.The tests cover:
Trac ticket: https://core.trac.wordpress.org/ticket/65186
AI Disclosure: