Build Testing

Why Build Testing?

The bash functionality of drupalci.yml is intended to do minor setup work. It is *not* intended to be a bash testing framework or anything resembling that. It is not desirable to place bash scripts into drupalci.yml and then rely on the exit codes of those scripts as evidence of build success or failure.

It is preferable to have these bash scripts execute within the context of phpunit, which frames them as a standard test, and give the results in a standard way, and is runnable in environments *other than* drupalci.

PHPUnit in Drupal

Execute and write tests using Drupal's implementation of PHPUnit.

PHPUnit was added to Drupal 8 and is the standard for testing Drupal 8+.

It is highly recommended to read the official PHPUnit documentation. In particular, the list of assertions to learn what assertion to use.

Subscribe with RSS Subscribe to RSS - PHPUnit Drupal 8