[wp-trac] [WordPress Trac] #35961: Unit tests for _n_noop & _nx_noop
WordPress Trac
noreply at wordpress.org
Fri Feb 26 14:30:10 UTC 2016
#35961: Unit tests for _n_noop & _nx_noop
--------------------------------------+-----------------------------
Reporter: realloc | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Changes (by johnbillion):
* version: trunk =>
* milestone: Awaiting Review => Future Release
Comment:
Thanks again for writing tests, @realloc!
I think these tests are too tightly coupled to the internal implementation
of `_n_noop()` and `_nx_noop()`. Testing that the function returns an
array containing those elements is ok, but what really needs to be tested
is whether their return values work when they're passed to
`translate_nooped_plural()`. Testing the return value doesn't really prove
anything with regard to these particular functions.
I think it would be better to combine the tests with some for
`translate_nooped_plural()`, that way we ensure that the `*_noop()`
functions correctly interact with `translate_nooped_plural()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35961#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list