You are here

function TMGMTUiTest::setUp in Translation Management Tool 8

Overrides DrupalWebTestCase::setUp()

Overrides TMGMTTestBase::setUp

File

tests/src/Functional/TMGMTUiTest.php, line 25

Class

TMGMTUiTest
Verifies basic functionality of the user interface

Namespace

Drupal\Tests\tmgmt\Functional

Code

function setUp() : void {
  parent::setUp();
  $filtered_html_format = FilterFormat::create(array(
    'format' => 'filtered_html',
    'name' => 'Filtered HTML',
  ));
  $filtered_html_format
    ->save();
  $this
    ->addLanguage('de');
  $this
    ->addLanguage('es');
  $this
    ->addLanguage('el');

  // Login as translator only with limited permissions to run these tests.
  $this
    ->loginAsTranslator(array(
    'access administration pages',
    'create translation jobs',
    'submit translation jobs',
    $filtered_html_format
      ->getPermissionName(),
  ), TRUE);
  $this
    ->drupalPlaceBlock('system_breadcrumb_block');
  $this
    ->createNodeType('page', 'Page', TRUE);
  $this
    ->createNodeType('article', 'Article', TRUE);
}