You are here

protected function MenuLinkContentTranslationUITest::createEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php \Drupal\Tests\menu_link_content\Functional\MenuLinkContentTranslationUITest::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

1 call to MenuLinkContentTranslationUITest::createEntity()
MenuLinkContentTranslationUITest::testTranslationLinkTheme in core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
Tests that translation page inherits admin status of edit page.

File

core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php, line 63

Class

MenuLinkContentTranslationUITest
Tests the menu link content translation UI.

Namespace

Drupal\Tests\menu_link_content\Functional

Code

protected function createEntity($values, $langcode, $bundle_name = NULL) {
  $values['menu_name'] = 'tools';
  $values['link']['uri'] = 'internal:/admin/structure/menu';
  $values['title'] = 'Test title';
  return parent::createEntity($values, $langcode, $bundle_name);
}