This information is from the code coverage report (see http://coverage.cwgordon.com/coverage).
We need to test:
Key: Italicized means in progress, Crossed out means either done or determined currently untestable or unnecessary to test or dead code.
1) drupal_get_content() with no specified region.
2) drupal_get_headers().
3) drupal_get_destination() with extra GET parameters.
4) drupal_goto() with $_REQUEST['edit']['destination'] set.
5) Custom url for page not found.
6) Custom url for access denied.
7) drupal_http_request() self test.
8) drupal_http_request() to https://
9) Invalid requests with drupal_http_request()
10) drupal_http_request()'s Authorization feature
11) drupal_http_request()'s that result in invalid response codes
12) 301, 302, 307, 403, and 404 responses with drupal_http_request().
13) Database error handling.
14) valid_url() ($absolute = FALSE)
15) check_file()
16) RSS feeds.
17) format_plural() with locale_get_plural().
18) User configuration of timezones.
19) format_date().
20) url() with a fragment in the path.
21) url() with $options['query']
22) Toggling on/off of clean urls.
23) l() for an active path item that already has a class.
24) RTL language support.
25) CSS caching.
26) drupal_add_js() with $scope != 'header'.
27) js preprocessing.
28) drupal_json().
29) Form elements with #pre_render.
30) Form elements with #post_render.
31) element_properties()
32) drupal_schema_fields_sql() without $prefix.
33) drupal_write_record() on a nonexistant table.
34) drupal_parse_info_file() on a nonexistant file.
35) drupal_explode_tags().
36) drupal_implode_tags().
37) drupal_flush_all_caches()
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | common_inc_tests_01.patch | 9.8 KB | cwgordon7 |
| #15 | page_not_found_access_denied_drupal_get_headers.4.patch | 8.98 KB | grndlvl |
| #12 | page_not_found_access_denied_drupal_get_headers.3.patch | 8.98 KB | grndlvl |
| #9 | page_not_found_access_denied_drupal_get_headers.patch | 7.94 KB | grndlvl |
| #8 | test_format_date.patch | 3.06 KB | grndlvl |
Comments
Comment #1
cwgordon7 commentedheh... no.
Comment #2
cwgordon7 commentedLet's get this started... this patch covers #'s 35 and 36 (drupal_explode_tags() and drupal_implode_tags()).
Comment #3
cwgordon7 commentedComment #4
catchTests pass so this looks RTBC to me if the sample text gets past Dries ;)
Did some cleanup of comments and escaped apostrophe inside t(), please don't credit on commit.
Comment #5
Susurrus commentedHopefully #27 will be covered by #251578: More flexible js/css ordering and an alter operation.
Comment #6
dries commentedI think the patch in #4 looks like an OK start, but
1) I'd want to invite you to improve the phpdoc of drupal_explode_tags() and drupal_implode_tags(). It took me a while to figure the context and to remember their purpose.
2) looking at the code of drupal_explode_tags() it doesn't look like our test cases are really representative. They seem to be low on commas, for example, and there isn't an actual multi-tag example?
Comment #7
dries commentedI've committed the patch as is, but I'm marking this 'code needs work' so we can still work on the comments in #6.
Thanks for the additional tests -- let's try to apply some more polish.
Comment #8
grndlvl commentedPatch for #19 format_date().
Comment #9
grndlvl commentedpatch for:
2) drupal_get_headers().
5) Custom url for page not found.
6) Custom url for access denied.
Also contains patch from comment #8
Comment #10
dries commented- Can we write 'medium' instead of 'med'.
- Can we add some code comments? Especially around the timezone handling and assertFormatDate().
- Otherwise looks great and needed.
Comment #11
grndlvl commented- Changed 'med' to 'medium'
- Added additional comments
Comment #12
grndlvl commented- Changed some comments around
Comment #13
grndlvl commented** need to apply will do tomorrow **
line #180: session_save_session(FALSE);
Comment #14
grndlvl commentedComment #15
grndlvl commentedsession_save_session(FALSE);
also HEAD had changed since last past so patch now applies to HEAD
Comment #16
cwgordon7 commentedsession_save_session() is now drupal_save_session(). Also needed a bit of commenting standard love. Rerolled, ready for review. :)
Comment #17
grndlvl commentedPer catches suggestion I have split the patch from #16 into multiple issues so that there is less of a patch to review.
format_date() -- http://drupal.org/node/316189
drupal_get_headers() -- http://drupal.org/node/316188
Custom Page Not Found -- http://drupal.org/node/316187
Custom Access Denied -- http://drupal.org/node/316186
Comment #18
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #19
catchMoving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.
Comment #20
Robin Millette commentedAny news here? Should we close this issue?