This wiki page documents a set of test for the Pathauto module. It needs help, but I wanted to publish the work that I've done so far so that others can help in coming up with other tests. Eventually I would like to turn these tests into something that can be automated with a tool like selenium and then run them before making any commits/releases.
One TODO: decide on a reference module that implements it's own pathauto to use for testing. Date could be a good one.
without further ado....
Pathauto Test Pattern for Pathauto 5
Prerequisites:
Fresh Drupal install
Insert pathauto files into a modules directory
Enable
Blog module
Book module
Forum module
Installation test
- Vist the admin/build/modules page
- Leave path disabled
- Enable pathauto
- Pathauto should require path.module
Settings
Visit admin/settings/pathauto
General settings:
- Separator. Change the separator to a different value like _. Create node, taxonomy term, and user that contain a space. Ensure that the space is replaced by the separator.
- Set maximum alias to 30 and component length to 10. Create content. Ensure that components and the total length are truncated appropriately.
- Index aliases - don't test. These suck.
- Update action: Test each of the three.
Quotes:
-
Set quotation marks to be replaced by separator. Create node and taxonomy term that contain a quotation mark. Ensure that the quotation mark is replaced by separator.
-
Set quotation marks to be replaced by separator. Create node and taxonomy term that contain a quotation mark. Ensure that the quotation mark is removed with no replacement character.