Drupal Test Assertions
Security covered
Drupal 8–11
This project provides a collection of helper classes and methods to streamline writing tests for Drupal core. It offers assertions for common scenarios like checking entity fields, form visibility, entity references, moderation, language, roles, and page content.
This project provides some useful test assertions related to Drupal core modules.
- assertEntityTypeHasField
- assertFieldIsHiddenInForm
- assertFieldIsVisibleInForm
- assertFieldIsRequired
- assertFieldIsNotRequired
- assertEntityReferenceTargetBundles
- assertEntityReferenceTargetBundlesStrict
- assertNoCreateAccountsAllowed
- assertUnprivilegedRolesCannotPerformRiskyActions
- assertModerationEnabledForEntityType
- assertWorkflowForEntityType
- assertWorkflowTransition
- assertLanguageExists
- assertEntityExists
- assertRoleExists
- assertRoleHasPermissions
- assertBooksAllowedInOutlines
- assertBookChildPages
- assertMetatag
- assertRedirectedTo
- assertUrlIs
- assertStatusCode
- assertPageContains
- assertPageNotContains
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.