public function ReplicatorAliasTest::setUp in Workspace 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ReplicatorAliasTest.php, line 67
Class
- ReplicatorAliasTest
- Test the workspace entity with EventSubscriber alias change.
Namespace
Drupal\Tests\workspace\FunctionalCode
public function setUp() {
parent::setUp();
$permissions = [
'create_workspace',
'edit_own_workspace',
'view_own_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();
$this->aliasManager = \Drupal::service('path.alias_manager');
$this->pathAutoGenerator = \Drupal::service('pathauto.generator');
}