functional test for node_teaser()

Bevan - January 15, 2008 - 09:42
Project:SimpleTest
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

The attached test runs a few tests on d6's node_teaser(). It is based on several tests in http://drupal.org/node/180425. This work is sponsored by CivicActions.

It runs 119 tests but 117 of them are run by 3 assert functions in a loop that tests edge cases of node_teaser with varying $size parameters.

#1

Bevan - January 16, 2008 - 23:40

Forgot the patch

AttachmentSize
node_teaser.test_.txt4.82 KB

#2

Rok Žlender - January 20, 2008 - 10:08

Great stuff.
I made few changes to your test.

  • Added setup and teardown functions
  • in testFirstSentenceQuestion I removed asdlkfj from expected teaser var.

If there is a reason you left asdlkfj in that var please comment otherwise I'll commit this.

AttachmentSize
node_teaser.test4.91 KB

#3

Bevan - January 21, 2008 - 00:46

'asdlkfj' was a mistake that I had done in demonstrating how unit tests work. thanks for removing it

#4

beeradb - January 24, 2008 - 04:12
Status:patch (code needs review)» patch (reviewed & tested by the community)

Looking over the test it looks sane. I ran it and everything passed. marking rtbc

#5

Rok Žlender - January 30, 2008 - 08:25
Status:patch (reviewed & tested by the community)» fixed

Committed thanks Bevan and beeradb for review.

#6

Anonymous (not verified) - February 13, 2008 - 08:31
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.