You are here

function TMGMTTestBase::setUp in Translation Management Tool 8

Same name in this branch
  1. 8 src/Tests/TMGMTTestBase.php \Drupal\tmgmt\Tests\TMGMTTestBase::setUp()
  2. 8 tests/src/Functional/TMGMTTestBase.php \Drupal\Tests\tmgmt\Functional\TMGMTTestBase::setUp()

Overrides DrupalWebTestCase::setUp()

Overrides WebTestBase::setUp

File

src/Tests/TMGMTTestBase.php, line 77

Class

TMGMTTestBase
Base class for tests.

Namespace

Drupal\tmgmt\Tests

Code

function setUp() : void {
  parent::setUp();
  $this->default_translator = Translator::load('test_translator');
  $this
    ->drupalPlaceBlock('local_tasks_block');
  $this
    ->drupalPlaceBlock('local_actions_block');
  $this
    ->drupalPlaceBlock('page_title_block');

  // Load default admin permissions.
  $this->admin_permissions = array(
    'administer languages',
    'access administration pages',
    'administer content types',
    'administer tmgmt',
  );

  // Load default translator user permissions.
  $this->translator_permissions = array(
    'create translation jobs',
    'submit translation jobs',
    'accept translation jobs',
  );
}