Added a test, asserting the link is there.

Files: 
CommentFileSizeAuthor
#10 taxonomy-test-569076-9.patch1.04 KBwamilton
PASSED: [[SimpleTest]]: [MySQL] 33,331 pass(es).
[ View ]
#6 taxonomy-test-569076-6.patch1.04 KBrocket_nova
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch taxonomy-test-569076-6.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
#4 taxonomy-test-569076-4.patch1.01 KBrocket_nova
PASSED: [[SimpleTest]]: [MySQL] 33,998 pass(es).
[ View ]
#2 taxonomy-test-569076-2.patch1011 bytesrocket_nova
PASSED: [[SimpleTest]]: [MySQL] 33,313 pass(es).
[ View ]
taxonomy-test-breadcrumbs.patch1.5 KBalonpeer
Passed: 14734 passes, 0 fails, 0 exceptions
[ View ]

Comments

Status:Needs review» Needs work

+++ modules/taxonomy/taxonomy.test 5 Sep 2009 09:59:31 -0000
@@ -438,6 +438,23 @@ class TaxonomyTermTestCase extends Taxon
+    //$this->assertText(l($term2->name, 'taxonomy/term/' . $term2->tid), t('Parent term link is displayed when viewing the node.'));
+    //$this->assertLink($term2->name, t('Parent term link is displayed when viewing the node.'));

Please don't leave commented-out lines of code lying around.

I'm on crack. Are you, too?

Version:7.x-dev» 8.x-dev
Status:Needs work» Needs review
Issue tags:+needs backport to D7
StatusFileSize
new1011 bytes
PASSED: [[SimpleTest]]: [MySQL] 33,313 pass(es).
[ View ]

Re-roll patch from #1.

Status:Needs review» Needs work
Issue tags:+Novice

Thanks for your work on this patch. One minor correction for the doxygen:

+++ b/modules/taxonomy/taxonomy.testundefined
@@ -826,6 +826,21 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
+   * Test that the parent term is linked to from the child term page.

This should begin "Tests" rather than "Test". Reference: http://drupal.org/node/1354#functions

Also note that the Drupal 8.x patch will need to be rerolled, because the core directory structure for Drupal 8 has now changed. (For more information, see #22336: Move all core Drupal files under a /core folder to improve usability and upgrades). When the patch has been rerolled, please set the issue back to "Needs Review."

Tagging as novice for the task of rerolling the Drupal 8.x patch with the above doxygen fix.

Assigned:alonpeer» rocket_nova
Status:Needs work» Needs review
StatusFileSize
new1.01 KB
PASSED: [[SimpleTest]]: [MySQL] 33,998 pass(es).
[ View ]

@xjm Got it. Thanks for the feedback. Here's the re-rolled patch.

Also, I noticed that there are plenty of other docblocks that aren't of the right tense (e.g. says "Test" instead of "Tests"). Should I create a new issue for all of those in this file?

Thanks @rocket_nova! Regarding the other docblocks with the wrong tense, they will be cleaned up in #1326644: Clean up API docs for taxonomy module.

Edit: I was about to RTBC, but then I noticed the wordings are a bit wonky in the comments:

+++ b/core/modules/taxonomy/taxonomy.testundefined
@@ -826,6 +826,21 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
+   * Tests that the parent term is linked to from the child term page.

Here the juxtaposition of "to" and "from" is confusing. I'd change this to:

Tests that there is a link to the parent term on the child term page.

+++ b/core/modules/taxonomy/taxonomy.testundefined
@@ -826,6 +826,21 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
+    // Create two taxonomy terms and set term2 the parent of term1.

Looks like the word "as" is missing. I think it should be:

Create two taxonomy terms and set term2 as the parent of term1.

+++ b/core/modules/taxonomy/taxonomy.testundefined
@@ -826,6 +826,21 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
+    // Check for breadcrumb links to parent term.

And I'd just rewrite this as:

Verify that the page breadcrumbs include a link to the parent term.

Let me know if you're up to reroll again with these changes. Thanks!

StatusFileSize
new1.04 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch taxonomy-test-569076-6.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

Thanks @xjm! Here's the re-rolled patch with your suggestions.

#6: taxonomy-test-569076-6.patch queued for re-testing.

Status:Needs review» Needs work
Issue tags:+Novice, +needs backport to D7

The last submitted patch, taxonomy-test-569076-6.patch, failed testing.

Hm, looks like we need a reroll here. Once it's rerolled I think this is RTBC. Sorry for letting this one slip by me earlier. :)

StatusFileSize
new1.04 KB
PASSED: [[SimpleTest]]: [MySQL] 33,331 pass(es).
[ View ]

pickaxe is BUSTED!
git log -Staxonomy_get_term_by_name

Patch applied fine for me after applying to that commit. Committed and rebased for the attached.

Status:Needs work» Needs review

Status:Needs review» Reviewed & tested by the community

Thanks wamilton!

This patch looks good.

Was it a follow-up from another issue?

Status:Reviewed & tested by the community» Fixed

Nice find. Committed and pushed to 8.x and 7.x. Thanks!

Status:Fixed» Closed (fixed)
Issue tags:-Novice, -needs backport to D7

Automatically closed -- issue fixed for 2 weeks with no activity.