#51166 closed defect (bug) (fixed)
Move and update unit tests for selected() and checked()
Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | good-first-bug has-patch has-unit-tests |
Focuses: | Cc: |
Description
Background: #9862
Unit tests for selected()
and checked()
functions were added in [231/tests] and expanded in [232/tests].
At the time, the functions were in wp-admin/includes/template.php
, so the tests were added to phpunit/tests/admin/includesTemplate.php
.
The functions were later moved to wp-includes/general-template.php
in [13658], but the tests were never updated for the new location, they should now be in phpunit/tests/general/template.php
.
The tests could also be converted to use data providers.
Attachments (1)
Change History (8)
This ticket was mentioned in PR #506 on WordPress/wordpress-develop by wittich.
4 years ago
#1
- Keywords has-patch has-unit-tests added; needs-patch removed
This ticket was mentioned in PR #508 on WordPress/wordpress-develop by wittich.
4 years ago
#2
Unit tests for selected() and checked() functions were added in [231/tests] and expanded in [232/tests].
At the time, the functions were in wp-admin/includes/template.php, so the tests were added to phpunit/tests/admin/includesTemplate.php.
The functions were later moved to wp-includes/general-template.php in [13658], but the tests were never updated for the new location, they should now be in phpunit/tests/general/template.php.
The tests could also be converted to use data providers.
Fixes #51166
#3
@
4 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 48907:
#5
follow-up:
↓ 7
@
4 years ago
Your welcome! What do I do with the PR https://github.com/WordPress/wordpress-develop/pull/508 on GitHub? Close it?
I still did get the whole work flow...
Unit tests for selected() and checked() functions were added in [231/tests] and expanded in [232/tests].
At the time, the functions were in wp-admin/includes/template.php, so the tests were added to phpunit/tests/admin/includesTemplate.php.
The functions were later moved to wp-includes/general-template.php in [13658], but the tests were never updated for the new location, they should now be in phpunit/tests/general/template.php.
The tests could also be converted to use data providers.
Fixes #51166