You are here

public function BambooTwigSecurityTest::testHasPermissions in Bamboo Twig 8.4

Same name in this branch
  1. 8.4 tests/src/Functional/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigSecurityTest::testHasPermissions()
  2. 8.4 tests/src/Kernel/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Kernel\BambooTwigSecurityTest::testHasPermissions()
Same name and namespace in other branches
  1. 8.5 tests/src/Kernel/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Kernel\BambooTwigSecurityTest::testHasPermissions()

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

File

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

Class

BambooTwigSecurityTest
Tests Security twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Kernel

Code

public function testHasPermissions() {
  $result = $this->securityExtension
    ->hasPermissions([
    'bypass node access',
  ], 'OR', 1);
  $this
    ->assertTrue($result);
}