ContentTestTranslationUITest.php 1.29 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

  /**
   * Overrides \Drupal\simpletest\WebTestBase::setUp().
   */
27
  protected 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 42 43 44 45 46 47 48 49 50
  /**
   * Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::getNewEntityValues().
   */
  protected function getNewEntityValues($langcode) {
    $user = $this->drupalCreateUser();
    return array(
      'name' => $this->randomMachineName(),
      'user_id' => $user->id(),
    ) + parent::getNewEntityValues($langcode);
  }

51
}