You are here

public function BambooTwigSecurityTest::testHasNotRoles 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::testHasNotRoles()

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

File

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

Class

BambooTwigSecurityTest
Tests Security twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Kernel

Code

public function testHasNotRoles() {
  $result = $this->securityExtension
    ->hasRoles([
    'administrator',
  ], 'OR', 2);
  $this
    ->assertFalse($result);
}