Drupal Test Assertions
Security covered
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