[wp-trac] [WordPress Trac] #35294: Modification in phpdoc and unit tests for wp_dropdown_languages()
WordPress Trac
noreply at wordpress.org
Wed Jan 13 20:37:09 UTC 2016
#35294: Modification in phpdoc and unit tests for wp_dropdown_languages()
--------------------------------------+------------------
Reporter: realloc | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.5
Component: I18N | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------
Changes (by johnbillion):
* version: trunk => 4.0
* milestone: Awaiting Review => 4.5
Comment:
These assertions are good, but they are brittle because they test the
output of the function in its entirety. I think it would be better to test
various pieces of the output (using `assertContains()` or
`assertRegExp()`) to ensure they are as expected.
For example, what is actually being tested here is that the correct
languages are output in the correct optgroup, and the expected attributes
are present.
@realloc Do you want to take another look at this?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35294#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list