• 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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Title: Create tests for book » GHOP task #128: Create tests for book
aclight’s picture

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

boombatower’s picture

Status: Active » Needs review
FileSize
4.77 KB

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.

boombatower’s picture

FileSize
4.71 KB

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
Rok Žlender’s picture

Status: Needs review » Needs work
FileSize
4.76 KB

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.

boombatower’s picture

Status: Needs work » Needs review
FileSize
5.35 KB

I believe I have made all the requested changes.

Rok Žlender’s picture

Status: Needs review » Fixed

Thanks committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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