Opened 5 months ago
Closed 5 months ago
#65187 closed enhancement (fixed)
Tests: Add unit tests for wp_admin_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
This ticket adds comprehensive unit tests for the wp_admin_viewport_meta() function in wp-admin/includes/misc.php. The tests will cover the default meta tag generation, the admin_viewport_meta filter, and proper attribute escaping.
Change History (4)
This ticket was mentioned in PR #11744 on WordPress/wordpress-develop by @pbearne.
5 months ago
#1
- 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)
….php
Description:
This PR adds unit tests for the
wp_admin_viewport_meta()function inwp-admin/includes/misc.php. These tests ensure that the function correctly outputs the viewport meta tag, handles theadmin_viewport_metafilter, and properly escapes the content attribute.The tests cover:
admin_viewport_metafilter.Trac ticket: https://core.trac.wordpress.org/ticket/65187
AI Disclosure: