drupalCreateNode() creates by default nodes owned by the user running the tests (uid = 1). This is confusing for the test writer and has lead to three bad consequences:
- The Path test case created its own version (
PathTestCase::createNode), - Several tests add an ugly
('uid' => $user->uid)to thedrupalCreateNode()call, - Several tests assigned their test users more rights that strictly necessary (
edit all page contentinstead ofedit own page content).
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 308296-drupalcreatenode-love-D7.patch | 11.3 KB | dave reid |
| #6 | 308296-drupalcreatenode-love-D7.patch | 11.08 KB | dave reid |
| #4 | 308296-drupalcreatenode-love.patch | 10.36 KB | dave reid |
| #1 | 308296-drupalcreatenode-love.patch | 10.83 KB | damien tournoud |
Comments
Comment #1
damien tournoud commentedAnd the patch.
Comment #2
boombatower commentedWhat about #212304: drupalCreateNode does not use the internal browser?
Comment #3
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #4
dave reidRe-rollin
Comment #6
dave reidOk this one *should* pass all the tests now. I got too lazy to not run some local tests first and just relied on the testing bot. *slaps hand* Bad Dave...
Comment #8
dave reidFrak...that wasn't the latest version.
Comment #9
dries commentedLooks like a nice little clean-up. Committed to CVS HEAD. Thanks.