diff --git a/core/modules/search/templates/search-result.html.twig b/core/modules/search/templates/search-result.html.twig index 7164d2c..698a5f6 100644 --- a/core/modules/search/templates/search-result.html.twig +++ b/core/modules/search/templates/search-result.html.twig @@ -5,7 +5,7 @@ * * This template renders a single search result and is collected into * search-results.twig. This and the parent template are - * dependent to one another sharing the markup for definition lists. + * dependent to one another sharing the markup for ordered lists. * * Available variables: * - url: URL of the result. @@ -13,7 +13,6 @@ * - snippet: A small preview of the result. Does not apply to user searches. * - info: String of all the meta information ready for print. Does not apply * to user searches. - * - info_split: Contains same data as info, split into a keyed array. * - module: The machine-readable name of the module (tab) being searched, such * as "node" or "user". * - title_prefix: Additional output populated by modules, intended to be @@ -21,14 +20,15 @@ * appears in the template. * - title_suffix: Additional output populated by modules, intended to be * displayed after the main title tag that appears in the template. - * - * Default keys within info_split: - * - info_split.type: Node type (or item type string supplied by module). - * - info_split.user: Author of the node linked to users profile. Depends - * on permission. - * - info_split.date: Last update of the node. Short formatted. - * - info_split.comment: Number of comments output as "% comments", % - * being the count. Depends on comment.module. + * - info_split: Contains same data as info, but split into separate parts. + * - info_split.type: Node type (or item type string supplied by module). + * - info_split.user: Author of the node linked to users profile. Depends + * on permission. + * - info_split.date: Last update of the node. Short formatted. + * - info_split.comment: Number of comments output as "% comments", % + * being the count. (Depends on comment.module). + * @todo: the info variable needs to be made drillable and each of these sub + * items should instead be within info and renamed info.foo, info.bar, etc. * * Other variables: * - title_attributes: HTML attributes for the title. diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreUnitTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreUnitTest.php index ac26bd7..e2630c0 100644 --- a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreUnitTest.php +++ b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreUnitTest.php @@ -23,8 +23,8 @@ class UpdateCoreUnitTest extends UnitTestBase { public static function getInfo() { return array( - 'name' => "Unit tests", - 'description' => 'Test update funcionality unrelated to the database.', + 'name' => 'Unit tests', + 'description' => 'Test update functionality unrelated to the database.', 'group' => 'Update', ); } @@ -38,7 +38,7 @@ function setUp() { * Tests that _update_build_fetch_url() builds the URL correctly. */ function testUpdateBuildFetchUrl() { - //first test that we didn't break the trivial case + // First test that we didn't break the trivial case $project['name'] = 'update_test'; $project['project_type'] = ''; $project['info']['version'] = ''; @@ -49,14 +49,14 @@ function testUpdateBuildFetchUrl() { $url = _update_build_fetch_url($project, $site_key); $this->assertEqual($url, $expected, "'$url' when no site_key provided should be '$expected'."); - //For disabled projects it shouldn't add the site key either. + // For disabled projects, it shouldn't add the site key either. $site_key = 'site_key'; $project['project_type'] = 'disabled'; $expected = 'http://www.example.com/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY; $url = _update_build_fetch_url($project, $site_key); $this->assertEqual($url, $expected, "'$url' should be '$expected' for disabled projects."); - //for enabled projects, adding the site key + // For enabled projects, adding the site key. $project['project_type'] = ''; $expected = 'http://www.example.com/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY; $expected .= '?site_key=site_key'; @@ -64,8 +64,7 @@ function testUpdateBuildFetchUrl() { $url = _update_build_fetch_url($project, $site_key); $this->assertEqual($url, $expected, "When site_key provided, '$url' should be '$expected'."); - // http://drupal.org/node/1481156 test incorrect logic when URL contains - // a question mark. + // Test incorrect logic when the URL contains a question mark. $project['info']['project status url'] = 'http://www.example.com/?project='; $expected = 'http://www.example.com/?project=/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY; $expected .= '&site_key=site_key';