public function BambooTwigSecurityTest::testHasRoles in Bamboo Twig 8.5
Same name in this branch
- 8.5 tests/src/Functional/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigSecurityTest::testHasRoles()
- 8.5 tests/src/Kernel/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Kernel\BambooTwigSecurityTest::testHasRoles()
Same name and namespace in other branches
- 8.4 tests/src/Kernel/BambooTwigSecurityTest.php \Drupal\Tests\bamboo_twig\Kernel\BambooTwigSecurityTest::testHasRoles()
@covers Drupal\bamboo_twig_security\TwigExtension\Security::hasRoles
File
- tests/
src/ Kernel/ BambooTwigSecurityTest.php, line 88
Class
- BambooTwigSecurityTest
- Tests Security twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\KernelCode
public function testHasRoles() {
$result = $this->securityExtension
->hasRoles([
'administrator',
], 'OR', 1);
$this
->assertTrue($result);
}