ContentTestTranslationUITest.php 1.28 KB
Newer Older
1
2
3
4
<?php

/**
 * @file
5
 * Definition of Drupal\entity\Tests\ContentTestTranslationUITest.
6
7
 */

8
namespace Drupal\content_translation\Tests;
9
10

/**
11
12
13
 * Tests the test content translation UI with the test entity.
 *
 * @group content_translation
14
 */
15
class ContentTestTranslationUITest extends ContentTranslationUITest {
16
17
18
19
20
21

  /**
   * Modules to enable.
   *
   * @var array
   */
22
  public static $modules = array('language', 'content_translation', 'entity_test');
23
24
25
26
27

  /**
   * Overrides \Drupal\simpletest\WebTestBase::setUp().
   */
  function setUp() {
28
    // Use the entity_test_mul as this has multilingual property support.
29
    $this->entityTypeId = 'entity_test_mul';
30
31
32
33
    parent::setUp();
  }

  /**
34
   * Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::getTranslatorPermission().
35
   */
36
  protected function getTranslatorPermissions() {
37
    return array_merge(parent::getTranslatorPermissions(), array('administer entity_test content'));
38
39
40
  }

  /**
41
   * Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::getNewEntityValues().
42
43
   */
  protected function getNewEntityValues($langcode) {
44
    $user = $this->drupalCreateUser();
45
    return array(
46
      'name' => $this->randomMachineName(),
47
      'user_id' => $user->id(),
48
49
50
51
    ) + parent::getNewEntityValues($langcode);
  }

}