From a1cbd755458534fb2baf161307ca964ff17f22ca Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 4 Oct 2010 14:51:16 +0000 Subject: #930708 by catch, dww: Fixed taxonomy_update_7005() can go on an infinite search. --- modules/simpletest/tests/upgrade/drupal-6.filled.database.php | 5 +++++ modules/simpletest/tests/upgrade/upgrade.taxonomy.test | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'modules/simpletest/tests') diff --git a/modules/simpletest/tests/upgrade/drupal-6.filled.database.php b/modules/simpletest/tests/upgrade/drupal-6.filled.database.php index 2bd4a54e9..9f33ee0a7 100644 --- a/modules/simpletest/tests/upgrade/drupal-6.filled.database.php +++ b/modules/simpletest/tests/upgrade/drupal-6.filled.database.php @@ -13265,6 +13265,11 @@ db_insert('term_node')->fields(array( 'vid', 'tid', )) +->values(array( + 'nid' => '1', + 'vid' => '1', + 'tid' => '0', +)) ->values(array( 'nid' => '1', 'vid' => '1', diff --git a/modules/simpletest/tests/upgrade/upgrade.taxonomy.test b/modules/simpletest/tests/upgrade/upgrade.taxonomy.test index 72be9ef8a..d4c47f8de 100644 --- a/modules/simpletest/tests/upgrade/upgrade.taxonomy.test +++ b/modules/simpletest/tests/upgrade/upgrade.taxonomy.test @@ -117,6 +117,13 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase { } } + // nid 1, revision 1 had a bogus record in {term_node} pointing to term + // ID 0. Make sure we ignored this instead of generating a bogus term. + if ($node->nid == 1) { + $link = l($term->name, 'taxonomy/term/0'); + $this->assertNoRaw($link, t('Bogus term (tid 0) is not displayed on node 1 vid %old_vid.', $args)); + } + // The first 12 nodes have two revisions. For nodes with // revisions, check that the oldest revision is associated only // to terms whose ID is equal to the node ID or 49 less the node ID. -- cgit v1.2.3