function SupportTicketTestBase::assertSupportTicketCreateAccess in Support Ticketing System 8
Asserts that support ticket create access correctly grants or denies access.
Parameters
string $bundle: The support ticket bundle to check access to.
bool $result: Whether access should be granted or not.
\Drupal\Core\Session\AccountInterface $account: The user account for which to check access.
string|null $langcode: (optional) The language code indicating which translation of the support ticket to check. If NULL, the untranslated (fallback) access is checked.
1 call to SupportTicketTestBase::assertSupportTicketCreateAccess()
- SupportTicketAccessTest::testSupportTicketAccess in modules/
support_ticket/ src/ Tests/ SupportTicketAccessTest.php - Runs basic tests for support_ticket_access function.
File
- modules/
support_ticket/ src/ Tests/ SupportTicketTestBase.php, line 112 - Contains \Drupal\support_ticket\Tests\SupportTicketTestBase.
Class
- SupportTicketTestBase
- Sets up ticket type.
Namespace
Drupal\support_ticket\TestsCode
function assertSupportTicketCreateAccess($bundle, $result, AccountInterface $account, $langcode = NULL) {
$this
->assertEqual($result, $this->accessHandler
->createAccess($bundle, $account, array(
'langcode' => $langcode,
)), $this
->supportTicketAccessAssertMessage('create', $result, $langcode));
}