Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2009 at 00:03 UTC
Updated:
3 Jun 2009 at 05:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunuhm.
Comment #3
sunAnother FAIL:
- Someone updated hook_nodeapi() to be split into individual functions and managed to invoke module_invoke() in a completely weird way:
Comment #4
sunSeriously, I thought I would fix 1 tiny bug here... I need a break.
1)
2)
3) Someone should ensure that all instances of ex. hook_nodeapi() were correctly converted into hook_node_X(), resp. module_invoke('foo', 'node_X', ...)
Anyway. This patch is RTBC.
Comment #6
sunhuh? Passes for me. Re-test.
Comment #7
sunNow invoking cron the same way like system.test. Thanks for the pointer, chx.
Comment #8
dave reidYeah using url() with cron.php/update.php doesn't work since the test bot runs in a subdirectory apparently. I had the same problem with tests and drupalGet() with adding a permission to run update.php.
Comment #9
chx commentedWow, lots of bugfixes. And, nice ASCII art.
Comment #10
dave reidShould be using
DRUPAL_ANONYMOUS_RID . '[search content]' => 1, etcSide node, I should really get back on #300993: User roles and permissions API so we don't have to use code like this in tests...
Why not use drupalCreateNode() since you're not doing anything special?
And yes, the ASCII art is funny/cool...but seriously...
Comment #11
sunOf course, the contained code to setup the check_plain() filter had a purpose. search_excerpt() strips all tags from the snippet that is displayed in the search results. If the content was formatted with the wrong text format, the HTML would be escaped.
Added this last assertion and clarified @todo 2) about the node comment link that's added to search index.
Comment #12
sunIncorporated all points from Dave Reid's review in #10.
Comment #13
webchickSince there were no steps posted to reproduce the bugs identified here (grumble, mutter), I had to reverse-engineer the test to figure it out. I came across some things when I did.
There's already enough going on in this test; let's not muddy the waters more by adding comments to Pages as well; just use article. If we don't have coverage for comments on Pages, let's put it in comment.test in a separate issue, since it seems unrelated to these bugs here.
Speaking of test locations, I realize that the bugs ultimately lie in the filter system, but the test is clearly an integration test of the search functionality, and should be relocated to search.test IMO. I can't forsee anyone ever finding this test in filter.test once all of the underlying bugs are fixed.
Why do we need to specify 1 for each of them, if we're only interested in "Escape all HTML"? Again, let's please keep the test focused only to what it needs to do to exhibit the buggy behaviour. Unless this is required, in which case, please clarify in the comment. Also, please add the "Escape all HTML" keywords to the comment as well.
:P
Forgive my ignorance, but how does this prove anything? Unless I'm really tired, you're using the same text for both the title of the node and the body of the comment, so this test will pass even without this patch.
Comment #14
dmitrig01 commentedFixed on all counts
Comment #15
dmitrig01 commentedthis time for real
Comment #16
dries commentedLooks good. Committed to CVS. Thanks for the patch, and the reviews.
Comment #17
sunHrm. Bugs, bugs, bugs.
#295864: SimpleTest: Change randomName() method to randomString() changed the function signature of $this->randomName().
Comment #18
sunComment #19
webchickCommitted. Thanks!