You are here

public function BambooTwigSecurityTest::testHasPermissionsInvalidConjunction in Bamboo Twig 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Kernel/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Kernel\BambooTwigSecurityTest::testHasPermissionsInvalidConjunction()

@covers Drupal\bamboo_twig_security\TwigExtension\Security::hasPermissions

File

tests/src/Kernel/BambooTwigSecurityTest.php, line 104

Class

BambooTwigSecurityTest
Tests Security twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Kernel

Code

public function testHasPermissionsInvalidConjunction() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('Invalid conjunction type "XOR".');
  $this->securityExtension
    ->hasPermissions([
    'bypass node access',
  ], 'XOR', 1);
}