Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cburschka’s picture

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?

drupal_was_my_past’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs work » Needs review
Issue tags: +Needs backport to D7
FileSize
1011 bytes

Re-roll patch from #1.

xjm’s picture

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.

drupal_was_my_past’s picture

Assigned: alonpeer » drupal_was_my_past
Status: Needs work » Needs review
FileSize
1.01 KB

@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?

xjm’s picture

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!

drupal_was_my_past’s picture

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

xjm’s picture

Issue tags: -Novice, -Needs backport to D7

#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.

xjm’s picture

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. :)

wamilton’s picture

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.

wamilton’s picture

Status: Needs work » Needs review
xjm’s picture

Status: Needs review » Reviewed & tested by the community

Thanks wamilton!

Dries’s picture

This patch looks good.

Was it a follow-up from another issue?

webchick’s picture

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.