public function ReplicatorTest::setUp in Workspace 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ReplicatorTest.php, line 58
Class
- ReplicatorTest
- Test the workspace entity.
Namespace
Drupal\Tests\workspace\FunctionalCode
public function setUp() {
parent::setUp();
$permissions = [
'create_workspace',
'edit_own_workspace',
'view_own_workspace',
'view_any_workspace',
'create test content',
'access administration pages',
'administer taxonomy',
'administer menu',
'access content overview',
'administer content types',
'administer node display',
'administer node fields',
'administer node form display',
];
$this
->createNodeType('Test', 'test');
$vocabulary = Vocabulary::create([
'name' => 'Tags',
'vid' => 'tags',
'hierarchy' => 0,
]);
$vocabulary
->save();
$test_user = $this
->drupalCreateUser($permissions);
$this
->drupalLogin($test_user);
$this
->setupWorkspaceSwitcherBlock();
$this->entityTypeManager = \Drupal::entityTypeManager();
}