protected function ReferenceAccessTest::setUp in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_entity/tests/src/Kernel/ReferenceAccessTest.php \Drupal\Tests\bibcite_entity\Kernel\ReferenceAccessTest::setUp()
Overrides KernelTestBase::setUp
File
- modules/
bibcite_entity/ tests/ src/ Kernel/ ReferenceAccessTest.php, line 50
Class
- ReferenceAccessTest
- Tests basic reference_access functionality.
Namespace
Drupal\Tests\bibcite_entity\KernelCode
protected function setUp() {
parent::setUp();
$this
->installSchema('system', 'sequences');
$this
->installEntitySchema('user');
$this
->installEntitySchema('bibcite_reference_type');
$this
->installEntitySchema('bibcite_reference');
$this
->installConfig('filter');
$this
->installConfig('bibcite_entity');
$this->accessHandler = $this->container
->get('entity_type.manager')
->getAccessControlHandler('bibcite_reference');
// Clear permissions for authenticated users.
$this
->config('user.role.' . RoleInterface::AUTHENTICATED_ID)
->set('permissions', [])
->save();
// Create user 1 who has special permissions.
$this
->drupalCreateUser();
}