Closed (fixed)
Project:
Mollom
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2009 at 13:24 UTC
Updated:
24 Apr 2014 at 17:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunComment #2
dave reidComment #3
sunComment #4
dries commentedCommitted this patch to CVS HEAD (D7) and DRUPAL-6--1.
Let's follow-up with a test for the Drupal 7 version of the module. We can worry about a Drupal 6 test later on.
Comment #5
sunI'm very totally absolutely sorry - that was a wrong change. :-|
As of now, I'm a bit baffled and don't really know whether contact form mails are actually recorded. Working on tests, which we absolutely need here to be sure.
Comment #6
sunThat makes a little more sense. Is the testbot still processing our nice patchies here?
Comment #7
sunerr, more like this, I meant.
Comment #9
sunI really wonder what the point of testing patches against release tags is... that's exactly useful for... what?
Comment #10
sun#7: mollom-DRUPAL-6--1.mail-report.7.patch queued for re-testing.
Comment #11
sunoh, uhm, heh, the bot was right.
Comment #12
dries commented1. Session ID is supposed to be the 3rd parameter of assertData(). The second parameter should be the entity ID.
2. When reviewing this patch I was confused by assertData(). I couldn't guess what this function does. Looking up the function declaration, I learned it was a Mollom only function. Maybe we should rename it to be a bit more self-explanatory. Maybe something like assertMollomSessionData()?
It is not clear why we load all the data in an array (i.e. $found) when all we do is assertTrue()?
Comment #13
sunActually, I hoped that the added documentation would have explained the first issue you're raising. :)
I understand that it's unfortunate that we can't store Mollom session data for mails as cleanly as for any other entity. However, since Drupal's mail system does not turn every mail that is sent into a real entity, we need to record every single that is sent. Therefore, users are only sending feedback on session ids, which technically do not map to any locally stored content.
We can surely rename to assertMollomData(), although I'm not too nervous here -- we're inside of a file called mollom.test after all.
Slightly more than just testing for TRUE - we are actually using the 'session_id' and 'url' keys of the returned data.
However, we might additionally want to assert that "session" actually is the entity type used in the URL.
Powered by Dreditor.
Comment #14
dries commentedI re-read the documentation and #1 is clear now.
Slightly more than just testing for TRUE - we are actually using the 'session_id' and 'url' keys of the returned data.
We're not really using those -- we're storing them in an array, but we aren't really using the array.
Comment #15
sunI suspect we're talking past each other... could you clarify "we aren't really using the array", please? :)
Aside from that, attached patch implements the additional changes from #12 and #13.
Comment #16
dries commentedI don't understand why we populate the array when we simply do assertTrue(). assertTrue() doesn't investigate the array so it seems like the array population is unnecessary code.
Comment #17
sunHm, I'm not able to follow you here - we are testing more than assertTrue() on the returned array - individual array keys are used in subsequent code lines, and by changing the function's name and moving the assertions out of it, I silently hoped to clarify this a bit more.
Comment #18
dries commentedD'oh. You're right. Slaps head. Committed to DRUPAL-6--1. Thanks sun. :)
Comment #19
sunStraight port against HEAD, applied almost cleanly. Let's see what the bot thinks.
Comment #21
sun#19: mollom-HEAD.mail-report.19.patch queued for re-testing.
Comment #22
sunStrange, that patch somehow passes for me locally.
Comment #24
sunOdd. Passes for me on two different systems... (?) Anyone any idea?
Comment #25
dries commentedI tested this patch and it worked on my local machine. Committed it to CVS HEAD.
Comment #26
sunCan we revert that commit, please? As usual, the testbot identified that mollom-HEAD does not pass, so it does not test any patches against it.
I badly need the testbot running to work on other patches; running tests manually simply takes too long.
Comment #27
dries commentedI re-ran the tests on my local hosts and things are still fine. Puzzled.
Comment #28
dries commentedI temporary rolled back this patch to see if that helps.
Comment #29
sun#19: mollom-HEAD.mail-report.19.patch queued for re-testing.
Comment #31
sunClean URLs are disabled on testbots. Therefore, URL pattern matching failed in this test.
Attached patch should and will pass. But please wait for green anyway ;)
Comment #32
dries commentedLooks good and the tests pass. Committed to CVS HEAD. The D6 patch seems still valid so just marking this 'fixed'.
Great job figuring this one out, sun.
Comment #33
sunUnfortunately, DRUPAL-6--1 is broken, too: http://qa.drupal.org/pifr/test/26854
Comment #34
dries commentedCommitted to CVS HEAD. Thanks.