Download & Extend

Confusing name for test method in NodeBlockTest

Project:Drupal core
Version:7.x-dev
Component:node.module
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)
Issue tags:Novice

Issue Summary

There's a method NodeBlocktest::testSearchFormBlock() which actually tests the syndicate block, not the search form block. It really should be renamed. This is in core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php.

Comments

#1

Assigned to:Anonymous» dermario

Let me give a try to fix it.

#2

Status:active» needs review

I renamed the method to

function testSyndicateBlock() {
..
AttachmentSizeStatusTest resultOperations
confusing_name-1824016-2.patch746 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 46,248 pass(es).View details

#3

Status:needs review» reviewed & tested by the community

That seems like a much more reasonable name. Thanks! This should be fine assuming the test bot agrees.

#4

Status:reviewed & tested by the community» fixed

Uh, yes! Those two things aren't the same thing at all, are they? :)

Committed and pushed to 8.x. Thanks!

#5

Version:8.x-dev» 7.x-dev
Status:fixed» patch (to be ported)

Actually, it looks like this one could use a backport to d7 -- node.test has the NodeBlockTestCase class with the same method name in it.

#6

Status:patch (to be ported)» needs review

I fixed that for d7 too. Created that patch on 7.x-dev version.

AttachmentSizeStatusTest resultOperations
confusing_name-1824016-6.patch746 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch confusing_name-1824016-6.patch. Unable to apply patch. See the log in the details link for more information.View details

#7

Status:needs review» needs work

The last submitted patch, confusing_name-1824016-6.patch, failed testing.

#8

That's not a 7.x patch -- there is no core directory in 7.x.

#9

Status:needs work» needs review

Yes obviously i was wrong. I am still learning git but i should have seen that by myself. Heres another patch for d7.

AttachmentSizeStatusTest resultOperations
confusing_name-1824016-9.patch644 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 39,536 pass(es).View details

#10

Assigned to:dermario» jhodgdon
Status:needs review» reviewed & tested by the community

Thanks! That patch looks right to me. I'll get it committed this week (avoiding non-essential core commits this week due to a big Views sprint going on).

#11

Assigned to:jhodgdon» Anonymous
Status:reviewed & tested by the community» fixed

Thanks! 7.x is now one word clearer. :) Oops. I guess this wasn't strictly documentation, but it's a clean-up and backport of a committed 8.x patch. Hope it's OK that I committed it. ...

#12

Status:fixed» closed (fixed)

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

nobody click here