public function RequiredByRoleTest::testRequiredByRole in Required by role 8
Tests the required by role behavior.
@dataProvider getRequiredCases
File
- src/
Tests/ Plugin/ Required/ RequiredByRoleTest.php, line 61 - Contains \Drupal\required_by_role\Tests\Plugin\Required\RequiredByRoleTest.
Class
- RequiredByRoleTest
- Tests the requird_by_role plugin.
Namespace
Drupal\required_by_role\Tests\Plugin\RequiredCode
public function testRequiredByRole($result, $user_roles, $required_roles) {
$required = $this->plugin
->getMatches($user_roles, $required_roles);
$this
->assertEquals($result, $required);
}