Right now there are no test to see if #attached_css and #attached_js actually work (and as you will see #attached_js will fail a test).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

tic2000’s picture

Status: Needs work » Reviewed & tested by the community

This will always have one fail because of #510108: Call theme closure function in process_page, not preprocess_page. We need that or #469242: Move <head> outside page.tpl.php commited to pass the test.

If I set it to CNR the bot will not be happy. If I let it CNW it will be ignored. I'll set to RTBC to have some eyes reviewing this.

PS. Any method to stop the bot from testing the patch?

Damien Tournoud’s picture

Status: Reviewed & tested by the community » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
1.81 KB

Rerolled against re-worked #attached_library/css/js framework

This patch implements tests for attaching css and javascript via drupal_render's #attached property, similar to JavaScriptTestCase::testAttachedLibrary. The tests are implemented independently of JavaScriptTestCase::testAttachedLibrary because drupal_process_attached treats #attached[library] differently than #attached[css] and #attached[js], but treats the latter two similarly.

This patch tests attaching javascript and css by setting string and array values for #attached[css/js]. More extensive options testing is not implemented since this feature basically serves as a wrapper for drupal_add_js and drupal_add_css. Further testing relevant to those functions need not be re-tested in this context.

Status: Needs review » Needs work

The last submitted patch failed testing.

sun’s picture

Title: Test for #attached_css and #attached_js » Test #attached
Priority: Normal » Critical

We absolutely need to test all variations, i.e. 'library', 'js', and 'css', especially adding more than one of each, and using all the different options to ensure they are properly passed on to drupal_add_*() functions.

I mention more than one, because there seems to be a bug with attached JS settings... #645822-8: #ajax is not extensible (and partially buggy)

sun.core’s picture

Priority: Critical » Normal

Tests don't qualify as critical.