How about a SimpleTest for Book Access?

lyricnz - January 21, 2009 - 22:45
Project:Book access
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Harry Slaughter
Status:reviewed & tested by the community
Description

This would help prevent regressions, such as experienced recently, and allow test-driven development.

#1

Harry Slaughter - January 25, 2009 - 21:25
Status:active» postponed

I would definitely love to do this, but it's low priority due to time constraints.

I will also wait until unit testing is more integrated with drupal (d7?) and simpletest can pass it's own unit tests out of the box :)

#2

lyricnz - January 30, 2009 - 01:28
Status:postponed» needs review

Does this help? It is a D6 SimpleTest (6.x-2.x-dev) that creates a few Book Pages in a Book, then updates a Role permission to add/remove permissions, checking each along the way. I haven't yet added tests for recent/current issues against this module, but that would be the logical next step.

336 passes, 0 fails, 0 exceptions

AttachmentSize
book_access.test 8.25 KB

#3

Harry Slaughter - January 30, 2009 - 01:33
Assigned to:Anonymous» Harry Slaughter

per our IRC conversation, i'll integrate your tests into book_access, but simpletest functionality in d6 does not seem quite stable yet.

#4

jhedstrom - March 24, 2009 - 16:49

FWIW, simpletest works very well in 6.x at this time. The unstable nature of it is a result of backporting changes from HEAD/D7, but very rarely will those changes break existing test suites--if they do, fixing them now simply lessens the work for the D7 upgrade of a given module.

#5

jhedstrom - March 24, 2009 - 16:56
Status:needs review» reviewed & tested by the community

The tests in #2 are all passing, and look well written. I don't see any reason not to add this to dev. Once it's there, additional tests can be written to fix open issues.

#6

Harry Slaughter - May 12, 2009 - 18:03

OK, sorry for not giving this much attention. I'll review this and release it if it doesn't break anything :)

#7

lyricnz - May 12, 2009 - 21:24

The D6 simpletest module has recently been updated, so there might be a few little things that need updating (static getInfo function, different base class name, etc). I'm sure you'll cope :)

 
 

Drupal is a registered trademark of Dries Buytaert.