Call drupal_add_css for a CSS with module and theme type, at least two media, preprocess TRUE/FALSE and assert the return value at the last call. Don't forget to check that an RTL CSS file is added as well if present.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | drupal_add_css_test2.patch | 3.01 KB | sime |
| #1 | drupal_add_css_test.patch | 2.6 KB | jerdavis |
Comments
Comment #1
jerdavisTest created by Ryan Szrama and Jer Davis - Testing all cases:
Stylesheet added using default parameters; media = all, type = module, preprocess = TRUE
Stylesheet added to mobile media with preprocess.
Stylesheet added to print media without preprocess.
Stylesheet added to print media without preprocess.
Right-to-left stylesheet added to print media without preprocess.
Hungarian pancakes rock!
Comment #2
rszrama commentedSubscribe in case we need to tweak the patch.
Comment #3
webchickComment #4
simeHey this patch applied and worked great, and i would say rtbc, but I thought it was worth adding a little assertTrue to see if one of the files got through to the theme layer, ie. from drupal_get_css().
I thought about trying to test the preprocess logic, but this I think should be tested separately.
Comment #6
lilou commentedSee: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
Comment #7
catchWe no longer have phpdoc for setUp(), getInfo() or tearDown()
http://drupal.org/node/325974
Comment #8
catchMoving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.
It's possible tests got added for this as part of the drupal_add_* revamp spree.