protected function ReplicateUITest::setUp in Replicate UI 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ReplicateUITest.php, line 52
Class
- ReplicateUITest
- Tests the UI functionality.
Namespace
Drupal\Tests\replicate_ui\FunctionalCode
protected function setUp() {
parent::setUp();
$this->user = $this
->drupalCreateUser([
'bypass node access',
'administer nodes',
'replicate entities',
'administer users',
'administer languages',
'administer content translation',
'create content translations',
'translate any entity',
'access content overview',
]);
$node_type = NodeType::create([
'type' => 'page',
]);
$node_type
->save();
$this->node = Node::create([
'title' => 'test title',
'type' => 'page',
]);
$this->node
->save();
$this
->placeBlock('local_tasks_block');
$this
->placeBlock('system_messages_block');
$this
->config('replicate_ui.settings')
->set('entity_types', [
'node',
'user',
])
->save();
\Drupal::service('router.builder')
->rebuild();
Cache::invalidateTags([
'entity_types',
]);
}