protected function TranslationOperationsFieldPermissionsTest::setUp in Translation Views 8
Overrides ViewTestBase::setUp
File
- tests/
src/ Functional/ TranslationOperationsFieldPermissionsTest.php, line 50
Class
- TranslationOperationsFieldPermissionsTest
- Class TranslationOperationsFieldPermissionsTest.
Namespace
Drupal\Tests\translation_views\FunctionalCode
protected function setUp($import_test_views = TRUE) {
parent::setUp($import_test_views);
$this
->drupalLogin($this->rootUser);
// Set up testing views.
ViewTestData::createTestViews(get_class($this), [
'translation_views_test_views',
]);
try {
$this
->setUpLanguages();
} catch (EntityStorageException $e) {
$this
->verbose($e
->getMessage());
}
// Enable translation for Article nodes.
$this
->enableTranslation('node', 'article');
// Create testing node.
$this
->drupalPostForm('node/add/article', [
'title[0][value]' => $this
->randomString(),
], 'Save');
$this
->drupalLogout();
}