You are here

public function BambooTwigSecurityTest::testHasRolesInvalidConjunction in Bamboo Twig 8.4

Same name and namespace in other branches
  1. 8.5 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\Kernel

Code

public function testHasRolesInvalidConjunction() {
  $this
    ->setExpectedException(\InvalidArgumentException::class, 'Invalid conjunction type "XOR".');
  $result = $this->securityExtension
    ->hasRoles([
    'administrator',
  ], 'XOR', 1);
}