Opened 10 years ago
Closed 9 years ago
#28579 closed enhancement (fixed)
Add unit tests (phpunit, qunit) for Customizer
Reported by: | westonruter | Owned by: | |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Customize | Keywords: | needs-patch |
Focuses: | javascript | Cc: |
Description
There is a lot of code in the Customizer, and it is completely lacking any PHP or JS unit tests. The only unit tests that currently reference the Customizer are:
- phpunit/tests/theme/WPTheme.php
- qunit/wp-admin/js/customize-header.js
But there is a lot of constructs in the Customizer which are completely untested. We need phpunit and qunit tests for the various aspects of the Customizer to ensure we don't introduce regressions when we extend it to manage more parts of WordPress.
Change History (11)
This ticket was mentioned in IRC in #wordpress-dev by westonruter. View the logs.
10 years ago
#3
@
10 years ago
I've started writing some initial QUnit tests as part of the work on #28709.
#5
@
10 years ago
Additional unit tests are being worked on in this pull request: https://github.com/xwpco/wordpress-develop/pull/46
#6
@
10 years ago
More unit tests are here: https://github.com/xwp/wordpress-develop/pull/47
#7
@
10 years ago
I just added quite a few more qunit tests in https://core.trac.wordpress.org/ticket/30701#comment:3
#8
@
10 years ago
First PHPUnit tests for WP_Customize_Setting
submitted in https://core.trac.wordpress.org/ticket/30988#comment:5
Tests were added for widget customizer in [27492] but then were reverted in [27493].