public function BambooTwigSecurityTest::testHasRolesInvalidConjunction in Bamboo Twig 8.5
Same name and namespace in other branches
- 8.4 tests/src/Kernel/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Kernel\BambooTwigSecurityTest::testHasRolesInvalidConjunction()
@covers Drupal\bamboo_twig_security\TwigExtension\Security::hasRoles
File
- tests/
src/ Kernel/ BambooTwigSecurityTest.php, line 113
Class
- BambooTwigSecurityTest
- Tests Security twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\KernelCode
public function testHasRolesInvalidConjunction() {
$this
->expectException(\InvalidArgumentException::class);
$this
->expectExceptionMessage('Invalid conjunction type "XOR".');
$this->securityExtension
->hasRoles([
'administrator',
], 'XOR', 1);
}