Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.07 KB

usage.rst

File metadata and controls

47 lines (33 loc) · 1.07 KB

Usage

Drupal API driver

_static/snippets/usage-drupal.php

Drush driver

_static/snippets/usage-drush.php

Blackbox

Note, the blackbox driver has no ability to control Drupal, and is provided as a fallback for when some tests can run without such access.

Any testing application should catch unsupported driver exceptions.

_static/snippets/usage-blackbox.php

Practical example with PHPUnit

By using the phpunit/mink project in conjunction with the Drupal Driver, one can use PHPUnit to drive browser sessions and control Drupal.

To install:

_static/snippets/phpunit-composer.json

and then, in the tests directory, a sample test:

_static/snippets/phpunitDrupalDriver.php