Closed (fixed)
Project:
SimpleTest
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2008 at 21:27 UTC
Updated:
15 Apr 2008 at 23:41 UTC
Jump to comment: Most recent file
In the SimpleTest library they have depreciated assertWantedText moving towards assertText which is what most, if not all, of the tests use anyway. I'm proposing that we remove assertWanted... methods like that and assertWantedRaw in favor of assertRaw.
When I get time I will create a patch, otherwise anyone else can feel free.
Any comments on this would be great.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | refactorST.patch | 67.81 KB | Rok Žlender |
Comments
Comment #1
dlangevin commentedMight it be better to just have assertWanted... methods call assert... methods instead? That way tests written using the old syntax will still pass.
Comment #2
boombatower commentedThat is definitely a possibility.
My main reasoning is to make the test consistent and easier to read since the two methods to the exact same thing. To fix it will be a simple find and replace and ensure that the tests still work.
The only function that will have an issues I believe is
assertWantedRawsince there is noassertRawcounterpart currently inDrupalTestCase. But still only find and replace.There are three older tests that currently use
assertWantedText, but all others don't.So this is not final, just throwing the idea out there.
Comment #3
webchick+1 for s/assertWantedRaw/assertRaw/g; to mirror SimpleTest's non-deprecated function names.
Comment #4
Rok Žlender commentedPatch changes asertWantedRaw to assertRaw and assertNoUnWantedRaw to assertNoRaw I also removed assertWantedText and assertNoUnwantedTest. I hope I got all changes in test files.
Comment #5
boombatower commentedCommitted.
I tested it on a few of the tests that I know work and they seemed fine. Had a few merging issues since the HEAD changes frequently, but I fixed those.
Since I am reviewing all tests and making sure they pass I should catch any unwanted side effects of this.
Thanks.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.