protected function VocabularyAccessTest::setUp in Taxonomy access fix 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/VocabularyAccessTest.php \Drupal\Tests\taxonomy_access_fix\Functional\VocabularyAccessTest::setUp()
Overrides TaxonomyTestBase::setUp
File
- tests/
src/ Functional/ VocabularyAccessTest.php, line 44
Class
- VocabularyAccessTest
- Tests administrative Taxonomy UI access.
Namespace
Drupal\Tests\taxonomy_access_fix\FunctionalCode
protected function setUp() {
parent::setUp();
$this->vocabularies[] = $this
->createVocabulary();
$this->vocabularies[] = $this
->createVocabulary();
$this->users['administer'] = $this
->drupalCreateUser([
'administer taxonomy',
'create terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['overview'] = $this
->drupalCreateUser([
'access taxonomy overview',
]);
$this->users['create_first_vocabulary'] = $this
->drupalCreateUser([
'create terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['overview_and_create_first_vocabulary'] = $this
->drupalCreateUser([
'access taxonomy overview',
'create terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['update_first_vocabulary'] = $this
->drupalCreateUser([
'edit terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['overview_and_update_first_vocabulary'] = $this
->drupalCreateUser([
'access taxonomy overview',
'edit terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['delete_first_vocabulary'] = $this
->drupalCreateUser([
'delete terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['overview_and_delete_first_vocabulary'] = $this
->drupalCreateUser([
'access taxonomy overview',
'delete terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['view_first_vocabulary'] = $this
->drupalCreateUser([
'view terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['overview_and_view_first_vocabulary'] = $this
->drupalCreateUser([
'access taxonomy overview',
'view terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['reorder_first_vocabulary'] = $this
->drupalCreateUser([
'reorder terms in ' . $this->vocabularies[0]
->id(),
]);
$this->users['overview_and_reorder_first_vocabulary'] = $this
->drupalCreateUser([
'access taxonomy overview',
'reorder terms in ' . $this->vocabularies[0]
->id(),
]);
$this
->drupalPlaceBlock('local_actions_block');
$this
->drupalPlaceBlock('page_title_block');
}