11.0.x

Write a Functional Test

Last updated

Configure Your Environment to Run Tests

Last updated

Concept: Testing

Last updated

Testing ensures that code remains reliable and functional. This tutorial introduces the primary types of tests in Drupal: Unit, Kernel, Functional, and FunctionalJavascript -- all executed via PHPUnit. We'll clarify the differences between each type of test and appropriate use cases. As module developers, understanding what to test and how to write tests is vital for robust and maintainable code.

In this tutorial, we'll:

Locate and Identify Existing Services

Last updated

Concept: Creating Custom Services

Last updated

Define a New Permission

Last updated

Concept: Permissions

Last updated

Concept: Menu Items and Links

Last updated

Concept: Internationalization (i18n)

Last updated

Concept: Themeable Output

Last updated

One of the features of any content management system's architecture is the separation of presentation and data. In Drupal, modules are responsible for figuring out what should be on the page, and themes are responsible for the final look and feel of anything shown in the browser. It's vital for a module to return themeable output, so that the active theme can determine how it's presented.

In this tutorial, we'll: