[wp-trac] [WordPress Trac] #32351: sanitize_option desperately needs unit tests
WordPress Trac
noreply at wordpress.org
Wed Jun 17 23:11:17 UTC 2015
#32351: sanitize_option desperately needs unit tests
------------------------------------+--------------------------
Reporter: chriscct7 | Owner: johnbillion
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.3
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+--------------------------
Changes (by johnbillion):
* keywords: good-first-bug has-patch dev-feedback => has-patch dev-
feedback
Comment:
[attachment:32351.4.diff] is an updated patch which:
* Uses strict comparison (`$this->assertSame()`) to avoid ambiguity with
empty values
* Adds tests for invalid values
* Adds tests for values that mutate when they're sanitized
One concern I have is that these tests don't actually test what they need
to test in order to uncover problems with
`$wpdb->strip_invalid_text_for_column()`. We have unit test coverage for
that method in `Tests_DB_Charset`, but is it enough?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32351#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list