GHOP task #128: Create tests for book

chx - January 7, 2008 - 08:19
Project:SimpleTest
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description
  • create a new book
  • create a small hiearchy of pages in there
  • check the list of children links
  • check from a children test the next, prev, up links
  • check the printer friendly version of the book

#1

chx - January 7, 2008 - 08:29
Title:Create tests for book» GHOP task #128: Create tests for book

#2

aclight - January 7, 2008 - 12:25

The GHOP task associated with this issue can be found at:
http://code.google.com/p/google-highly-open-participation-drupal/issues/...

#3

boombatower - January 10, 2008 - 05:27
Status:active» patch (code needs review)

After allot of messing around to decide what worked and what didn't and what was the best way to do it I finally came up with the attached solution. I believe it meets all the requirements posted on GHOP.

AttachmentSize
book_module.test_.txt4.77 KB

#4

boombatower - January 10, 2008 - 21:32

Made a few changes, due to requests made on IRC:

  • Fixed name of class
  • Removed unnecessary permissions
  • Created two users: one to create book content, and one to view
AttachmentSize
book_module.test_.txt4.71 KB

#5

Rok Žlender - January 11, 2008 - 16:18
Status:patch (code needs review)» patch (code needs work)

Tests look good and test everything we asked for. I made two changes to your file

  • Added setup function which is not needed but it is usually there for stuff like enabling modules or if you have few test functions that use same user perm you can put user creation in there
  • log out at the end is not needed, simpletest creates new browser session for every test function>

Before I mark this RTBC I'd like to see some documentation for your helper functions checkBookNode, generateOutlinePattern and createBookNode. Brief description of what function does, params and what does it return.

AttachmentSize
book_module.test4.76 KB

#6

boombatower - January 11, 2008 - 22:12
Status:patch (code needs work)» patch (code needs review)

I believe I have made all the requested changes.

AttachmentSize
book_module2.test_.txt5.35 KB

#7

Rok Žlender - January 12, 2008 - 22:10
Status:patch (code needs review)» fixed

Thanks committed.

#8

Anonymous (not verified) - January 26, 2008 - 22:36
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.