diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-31 00:23:01 -0800 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-31 00:23:01 -0800 |
commit | ae277600fb8a18f439b370de87fd9c8064f503a8 (patch) | |
tree | 27b88f92d8d052056a1c58d622144e9f6341eb68 /modules/taxonomy | |
parent | 67c4a08284ea92e9c03c1e8e22ec487a0b0fd437 (diff) | |
download | brdo-ae277600fb8a18f439b370de87fd9c8064f503a8.tar.gz brdo-ae277600fb8a18f439b370de87fd9c8064f503a8.tar.bz2 |
Issue #569076 by rocket_nova, wamilton, alonpeer: Test that taxonomy term page contains a link to parent terms in the breadcrumbs.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index 3fb5b64cc..25743bfea 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -1090,6 +1090,21 @@ class TaxonomyTermIndexTestCase extends TaxonomyWebTestCase { ))->fetchField(); $this->assertEqual(0, $index_count, t('Term 2 is not indexed.')); } + + /** + * Tests that there is a link to the parent term on the child term page. + */ + function testTaxonomyTermHierarchyBreadcrumbs() { + // Create two taxonomy terms and set term2 as the parent of term1. + $term1 = $this->createTerm($this->vocabulary); + $term2 = $this->createTerm($this->vocabulary); + $term1->parent = array($term2->tid); + taxonomy_term_save($term1); + + // Verify that the page breadcrumbs include a link to the parent term. + $this->drupalGet('taxonomy/term/' . $term1->tid); + $this->assertRaw(l($term2->name, 'taxonomy/term/' . $term2->tid), t('Parent term link is displayed when viewing the node.')); + } } /** |