You are here

protected function ShortcutTranslationUITest::createEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php \Drupal\Tests\shortcut\Functional\ShortcutTranslationUITest::createEntity()

Creates the entity to be translated.

Parameters

array $values: An array of initial values for the entity.

string $langcode: The initial language code of the entity.

string $bundle_name: (optional) The entity bundle, if the entity uses bundles. Defaults to NULL. If left NULL, $this->bundle will be used.

Return value

string The entity id.

Overrides ContentTranslationTestBase::createEntity

File

core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php, line 59

Class

ShortcutTranslationUITest
Tests the shortcut translation UI.

Namespace

Drupal\Tests\shortcut\Functional

Code

protected function createEntity($values, $langcode, $bundle_name = NULL) {
  $values['link']['uri'] = 'internal:/user';
  return parent::createEntity($values, $langcode, $bundle_name);
}