simpletest

Extract page content while simple testing with xpath and DOM

It is sometimes useful to grab content from the page that is currently tested. The idea is to search for the tag with xpath then convert it to DOM to get data... For instance, let's get the title and the href value of the second tab.

xpath examples & domxpath use with drupal

When the wonderful Feeds module can not be used it is useful to know how to use domxpath and to write queries.
usage:

Testing date fields: strtotime tips

Unit testing the creation of a node with a date field could fail because of wrong interpretation of the date by strtotime function

simpletest: count checkboxes checked

Sometimes it is useful to know exactly the amount of options enabled with a xpath expression