function SupportTicketTestBase::supportTicketAccessAssertMessage in Support Ticketing System 8
Constructs an assert message to display which support ticket access was tested.
Parameters
string $operation: The operation to check access for.
bool $result: Whether access should be granted or not.
string|null $langcode: (optional) The language code indicating which translation of the support ticket to check. If NULL, the untranslated (fallback) access is checked.
Return value
string An assert message string which contains information in plain English about the support ticket access permission test that was performed.
2 calls to SupportTicketTestBase::supportTicketAccessAssertMessage()
- SupportTicketTestBase::assertSupportTicketAccess in modules/
support_ticket/ src/ Tests/ SupportTicketTestBase.php - Asserts that support ticket access correctly grants or denies access.
- SupportTicketTestBase::assertSupportTicketCreateAccess in modules/
support_ticket/ src/ Tests/ SupportTicketTestBase.php - Asserts that support ticket create access correctly grants or denies access.
File
- modules/
support_ticket/ src/ Tests/ SupportTicketTestBase.php, line 133 - Contains \Drupal\support_ticket\Tests\SupportTicketTestBase.
Class
- SupportTicketTestBase
- Sets up ticket type.
Namespace
Drupal\support_ticket\TestsCode
function supportTicketAccessAssertMessage($operation, $result, $langcode = NULL) {
return format_string('Support ticket access returns @result with operation %op, language code %langcode.', array(
'@result' => $result ? 'true' : 'false',
'%op' => $operation,
'%langcode' => !empty($langcode) ? $langcode : 'empty',
));
}