diff --git a/libraries.api.php b/libraries.api.php index ac09743..16d0bf8 100644 --- a/libraries.api.php +++ b/libraries.api.php @@ -162,10 +162,13 @@ * variant, a boolean indicating whether the variant is installed or * not. * Note that in this group the 'versions' property is no longer available. - * - pre-load: Callbacks registered in this group are applied directly - * before this library is loaded. At this point the library contains - * variant-specific information, if specified. Note that in this group the - * 'variants' property is no longer available. + * - pre-dependencies-load: Callbacks registered in this group are applied + * directly before the library's dependencies are loaded. At this point + * the library contains variant-specific information, if specified. Note + * that in this group the 'variants' property is no longer available. + * - pre-load: Callbacks registered in this group are applied directly after + * the library's dependencies are loaded and before the library itself is + * loaded. * - post-load: Callbacks registered in this group are applied directly * after this library is loaded. At this point, the library contains a * 'loaded' key, which contains the number of files that were loaded. diff --git a/tests/libraries.test b/tests/libraries.test index 67b91f6..1770162 100644 --- a/tests/libraries.test +++ b/tests/libraries.test @@ -392,11 +392,13 @@ class LibrariesTestCase extends DrupalWebTestCase { $this->verbose('Actual:
' . var_export($library, TRUE) . '
'); $this->assertEqual($library, $expected, 'Detect callback was applied correctly.'); - // Test a callback in the 'pre-load' and 'post-load' phases. + // Test a callback in the 'pre-dependencies-load', 'pre-load' and + // 'post-load' phases. // Successfully loaded libraries should only contain information about the // already loaded variant. unset($expected['variants']); $expected['loaded'] = 0; + $expected['pre-dependencies-load callback'] = 'applied (top-level)'; $expected['pre-load callback'] = 'applied (top-level)'; $expected['post-load callback'] = 'applied (top-level)'; $library = libraries_load('example_callback');