SimpleTest handbook pages - lots of updates to do

Events happening in the community are now at Drupal community events on www.drupal.org.
catch's picture

So in the process of writing my first test I found a bunch of documentation discrepancies at http://drupal.org/simpletest

I'm not yet familiar enough with everything to know exactly what's deprecated, what's best practices/optional etc. so starting this to bring them up - then we can just edit stuff directly on the page once it's confirmed it needs changing. Or if they're not salvageable, just archive them quick so we're not presenting misleading information and replace with http://groups.drupal.org/node/11020 when it's ready.

Here's a quick run-down:

http://drupal.org/node/30023 - looks old.

DrupalTestCase should be DrupalWebTestCase ?
drupalModuleEnable($name) - this is still available but should we be using parent setUp($name) for most tests instead? If so this isn't mentioned either in the handbook or the phpdoc.

drupalVariableSet - this is just variable_set() now right? I'm unclear whether this should be used in setUp or at the beginning of the test functions or wherever.

drupalCreateUserRolePerm - should be drupalCreateUser ?

http://drupal.org/node/30010 - also looks old.

DrupalTestCase again.

assertWantedText - should be assertText and assertRaw no?
drupalPostRequest - should be drupalPost

http://drupal.org/node/30008 - more oldness, but also short.

http://drupal.org/node/30021 - ditto

http://drupal.org/node/30004 - archived.

Comments

Review

boombatower's picture

DrupalTestCase should be DrupalWebTestCase ?
drupalModuleEnable($name) - this is still available but should we be using parent setUp($name) for most tests instead? If so this isn't mentioned either in the handbook or the phpdoc.

drupalVariableSet - this is just variable_set() now right? I'm unclear whether this should be used in setUp or at the beginning of the test functions or wherever.

drupalCreateUserRolePerm - should be drupalCreateUser ?

yes

assertWantedText - should be assertText and assertRaw no?
drupalPostRequest - should be drupalPost

yes

cwgordon07 cleaned all this

catch's picture

cwgordon07 cleaned all this up last night :)

Testing and Quality Assurance

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: