This patch fixes:
- Exiting when temporary image directory can't be created - shouldn't this just report a test error like everything else?
- Image creation title test
- php 4 errors from using stripos
What else needs to happen:
That's hard to say, assertWantedText() is failing every time for the image body, but I tested on my own and I can't get my image nodes to save their body. I'm not sure how much moving forward anymore on this makes sense if Image.module isn't stable, but these preliminary changes would probably be reasonable to commit, at least it works better.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | simpletest-image-test-fixes-212141-2.patch | 3.2 KB | webchick |
| image_module.test_.patch | 2.16 KB | beeradb |
Comments
Comment #1
webchickThis is a good start, and I've managed to fix some more of them by changing the Submit button to Save, but the more I look at this test, the more it's clear that this test has been neglected for some time, and it plain needs a re-write using the more modern functions available.
Working on it...
Comment #2
webchickOk. Until http://drupal.org/node/212304 is fixed and we can use drupalCreateNode() the way it's intended, I'm going to CHEAT GLORIOUSLY and just remove the two lines that are checking for the existence of the body.
Why?
a) We should have one central place for the checking of these "did the node create correctly" stuff. drupalCreateNode() is the obvious place. All other tests that need to create nodes should call that function.
b) We should then remove those checks from every other test, as they're just wasted code. The job of those tests should be only to verify things specific to that module (ex. Did the image create ok?)
So, with that, I give you a patch that clears up the remaining errors. :)
Comment #3
boombatower commentedThe image test no longer exists in SimpleTest since the image module isn't part of core. The tests and any issues should be placed in the image module queue.