diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-02-15 15:12:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-02-15 15:12:22 +0000 |
commit | d89f0464264cb227a917a64660466099d93958aa (patch) | |
tree | 694f264cb9510118717d154b15a8d031d23ca982 /modules | |
parent | 4c9fd48cedb88ca3e4e1e19ef862feadb9e244d3 (diff) | |
download | brdo-d89f0464264cb227a917a64660466099d93958aa.tar.gz brdo-d89f0464264cb227a917a64660466099d93958aa.tar.bz2 |
- Patch #685034 by linclark: the number of comments in RDFa should be typed.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/block/block.test | 2 | ||||
-rw-r--r-- | modules/comment/comment.test | 4 | ||||
-rw-r--r-- | modules/dashboard/dashboard.module | 12 | ||||
-rw-r--r-- | modules/rdf/rdf.module | 2 | ||||
-rw-r--r-- | modules/rdf/rdf.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/session.test | 14 | ||||
-rw-r--r-- | modules/system/system.test | 4 |
7 files changed, 27 insertions, 13 deletions
diff --git a/modules/block/block.test b/modules/block/block.test index 91be85e2f..9c60726d7 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -21,7 +21,7 @@ class BlockTestCase extends DrupalWebTestCase { parent::setUp(); // Create and login user - $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer filters', 'access administration pages')); + $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer filters', 'access administration pages', 'access dashboard')); $this->drupalLogin($admin_user); // Define the existing regions diff --git a/modules/comment/comment.test b/modules/comment/comment.test index bf6c68ea8..4f27a460a 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -1103,13 +1103,13 @@ class CommentRdfaTestCase extends CommentHelperCase { // Tests number of comments in teaser view. $this->drupalGet('node'); - $comment_count_teaser = $this->xpath("//div[contains(@typeof, 'sioc:Item')]//li[contains(@class, 'comment_comments')]/a[contains(@property, 'sioc:num_replies') and contains(@content, '2')]"); + $comment_count_teaser = $this->xpath("//div[contains(@typeof, 'sioc:Item')]//li[contains(@class, 'comment_comments')]/a[contains(@property, 'sioc:num_replies') and contains(@content, '2') and @datatype='xsd:integer']"); $this->assertTrue(!empty($comment_count_teaser), t('RDFa markup for the number of comments found on teaser view.')); // Tests number of comments in full node view. $this->drupalGet('node/' . $this->node1->nid); $node_url = url('node/' . $this->node1->nid); - $comment_count_teaser = $this->xpath("/html/head/meta[@about='$node_url' and @property='sioc:num_replies' and @content='2']"); + $comment_count_teaser = $this->xpath("/html/head/meta[@about='$node_url' and @property='sioc:num_replies' and @content='2' and @datatype='xsd:integer']"); $this->assertTrue(!empty($comment_count_teaser), t('RDFa markup for the number of comments found on full node view.')); } diff --git a/modules/dashboard/dashboard.module b/modules/dashboard/dashboard.module index 44629f2a9..c4f1be96d 100644 --- a/modules/dashboard/dashboard.module +++ b/modules/dashboard/dashboard.module @@ -62,6 +62,18 @@ function dashboard_menu() { } /** + * Implements hook_menu_alter(). + */ +function dashboard_menu_alter(&$items) { + // Make the dashboard the default local task on /admin. + $items['admin']['title'] = 'Dashboard'; + $items['admin']['page callback'] = 'dashboard_admin'; + $items['admin']['access arguments'] = array('access dashboard'); + $items['admin/dashboard']['type'] = MENU_DEFAULT_LOCAL_TASK; + $items['admin/by-task']['type'] = MENU_LOCAL_TASK; +} + +/** * Implements hook_block_info_alter(). * * Skip rendering dashboard blocks when not on the dashboard page itself. This diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module index ebe427724..edd4f1007 100644 --- a/modules/rdf/rdf.module +++ b/modules/rdf/rdf.module @@ -423,6 +423,7 @@ function rdf_preprocess_node(&$variables) { if (isset($variables['content']['links']['comment']['#links']['comment_comments'])) { $comment_count_attributes['property'] = $variables['node']->rdf_mapping['comment_count']['predicates']; $comment_count_attributes['content'] = $variables['node']->comment_count; + $comment_count_attributes['datatype'] = $variables['node']->rdf_mapping['comment_count']['datatype']; $variables['content']['links']['comment']['#links']['comment_comments']['attributes'] += $comment_count_attributes; } // In full node view, the number of comments is not displayed by @@ -434,6 +435,7 @@ function rdf_preprocess_node(&$variables) { 'about' => $variables['node_url'], 'property' => $variables['node']->rdf_mapping['comment_count']['predicates'], 'content' => $variables['node']->comment_count, + 'datatype' => $variables['node']->rdf_mapping['comment_count']['datatype'], ), ); drupal_add_html_head($element, 'rdf_node_comment_count'); diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test index 1a41b96cf..e507e3f31 100644 --- a/modules/rdf/rdf.test +++ b/modules/rdf/rdf.test @@ -400,7 +400,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { } // Tests whether the property has been set for number of comments. - $tracker_replies = $this->xpath("//tr[@about='$url']//td[contains(@property, 'sioc:num_replies') and contains(@content, '0')]"); + $tracker_replies = $this->xpath("//tr[@about='$url']//td[contains(@property, 'sioc:num_replies') and contains(@content, '0') and @datatype='xsd:integer']"); $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user'=> $user))); // Tests that the appropriate RDFa markup to annotate the latest activity diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test index 2118f8501..7caecbe98 100644 --- a/modules/simpletest/tests/session.test +++ b/modules/simpletest/tests/session.test @@ -279,15 +279,15 @@ class SessionHttpsTestCase extends DrupalWebTestCase { // Verify that user is logged in on secure URL. $this->curlClose(); - $this->drupalGet($this->httpsUrl('admin'), array(), array('Cookie: ' . $cookie)); - $this->assertText(t('Administer')); + $this->drupalGet($this->httpsUrl('admin/config'), array(), array('Cookie: ' . $cookie)); + $this->assertText(t('Configuration')); $this->assertResponse(200); // Verify that user is not logged in on non-secure URL. if (!$is_https) { $this->curlClose(); - $this->drupalGet('admin', array(), array('Cookie: ' . $cookie)); - $this->assertNoText(t('Administer')); + $this->drupalGet('admin/config', array(), array('Cookie: ' . $cookie)); + $this->assertNoText(t('Configuration')); $this->assertResponse(403); } @@ -340,16 +340,16 @@ class SessionHttpsTestCase extends DrupalWebTestCase { ); foreach ($cookies as $cookie_key => $cookie) { - foreach (array('admin', $this->httpsUrl('admin')) as $url_key => $url) { + foreach (array('admin/config', $this->httpsUrl('admin/config')) as $url_key => $url) { $this->curlClose(); $this->drupalGet($url, array(), array('Cookie: ' . $cookie)); if ($cookie_key == $url_key) { - $this->assertText(t('Administer')); + $this->assertText(t('Configuration')); $this->assertResponse(200); } else { - $this->assertNoText(t('Administer')); + $this->assertNoText(t('Configuration')); $this->assertResponse(403); } } diff --git a/modules/system/system.test b/modules/system/system.test index 0bd05a45b..e33ad11a8 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1250,7 +1250,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { ); $this->drupalPost('admin/appearance', $edit, t('Save configuration')); - $this->drupalGet('admin'); + $this->drupalGet('admin/config'); $this->assertRaw('themes/garland', t('Administration theme used on an administration page.')); $this->drupalGet('node/' . $this->node->nid); @@ -1268,7 +1268,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { ); $this->drupalPost('admin/appearance', $edit, t('Save configuration')); - $this->drupalGet('admin'); + $this->drupalGet('admin/config'); $this->assertRaw('themes/garland', t('Administration theme used on an administration page.')); $this->drupalGet('node/add'); |