From 66a33714154837dd3663ccbad4cbab3ad851cba2 Mon Sep 17 00:00:00 2001 From: webchick Date: Tue, 31 Jan 2012 00:23:18 -0800 Subject: [PATCH] Issue #569076 by rocket_nova, wamilton, alonpeer: Test that taxonomy term page contains a link to parent terms in the breadcrumbs. --- core/modules/taxonomy/taxonomy.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test index a4d50d3523c..6d8060268cf 100644 --- a/core/modules/taxonomy/taxonomy.test +++ b/core/modules/taxonomy/taxonomy.test @@ -1128,6 +1128,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.')); + } } /**