Download & Extend

GHOP task #128: Create tests for book

Project:SimpleTest
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:GHOP

Issue Summary

  • 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

Comments

#1

Title:Create tests for book» GHOP task #128: Create tests for book

#2

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

#3

Status:active» 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.

AttachmentSizeStatusTest resultOperations
book_module.test_.txt4.77 KBIgnored: Check issue status.NoneNone

#4

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
AttachmentSizeStatusTest resultOperations
book_module.test_.txt4.71 KBIgnored: Check issue status.NoneNone

#5

Status:needs review» 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.

AttachmentSizeStatusTest resultOperations
book_module.test4.76 KBIgnored: Check issue status.NoneNone

#6

Status:needs work» needs review

I believe I have made all the requested changes.

AttachmentSizeStatusTest resultOperations
book_module2.test_.txt5.35 KBIgnored: Check issue status.NoneNone

#7

Status:needs review» fixed

Thanks committed.

#8

Status:fixed» closed (fixed)

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

nobody click here