I'm looking for a simple example to add to the SimpleTest docs I'm writing, and chx suggested this one. However, it needs some work:

1. It's not name-spaced to the module.
2. It's not testModuleVerb, it's testModuleNounVerb
3. It doesn't ensure that page is created before it tries to add something.
4. $edit['title'] = rather than $edit['title'] =
5. Some assertions have descriptions, some don't.
6. Assertion descriptions should be wrapped in t() and aren't.
7. It shouldn't be assertNotNull() because node_load returns FALSE when it can't find anything. chx suggested assertNotIdentical($node, FALSE)

Comments

boombatower’s picture

Component: unit testing » tests

Change component is relation to http://drupal.org/node/253744.

catch’s picture

Title: Clean up PageCreationTestCase » TestingParty08: Clean up PageCreationTestCase
damien tournoud’s picture

Assigned: webchick » Unassigned
mikey_p’s picture

StatusFileSize
new936 bytes

Some of this was fixed previously

1. Fixed
2. Fixed
3. We are checking the status message on the next page
4. Note sure what this is about??
5. Previously fixed
6. Previously fixed
7. This was fixed back in #295719: node.test cleanup

mikey_p’s picture

Status: Active » Needs review

status....

boombatower’s picture

Perhaps?

testNodePageCreation -> testNodeCreation ?

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review
catch’s picture

Status: Needs review » Needs work

I agree with boombatower in #6, so CNW for that change.

kscheirer’s picture

Component: tests » base system
Status: Needs work » Needs review

rerolled against HEAD with #6

kscheirer’s picture

StatusFileSize
new806 bytes

Status: Needs review » Needs work

The last submitted patch failed testing.

deekayen’s picture

Status: Needs work » Needs review

trying to get another test bot in the pool. didn't work right this time.

cburschka’s picture

Status: Needs review » Reviewed & tested by the community

Tiny patch that looks sensible...

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.