1 path_pattern.test public PathPatternLocaleTestCase::testNeutralTransliteration()

Language neutral German node has the correct transliteration applied.

File

core/modules/path/tests/path_pattern.test, line 904
Functionality tests for automatic path generation.

Class

PathPatternLocaleTestCase

Code

public function testNeutralTransliteration() {
  config_set('system.core', 'language_default', 'de');
  config_set('path.settings', 'transliterate', TRUE);
  // cspell:disable
  $title_de = 'Lückenbüßer stören DE';
  $title_en = 'Lückenbüßer stören EN';
  // cspell:enable
  $edit = array(
    'title' => $title_de,
    'path[auto]' => TRUE,
  );
  // We need to get rid of the session.
  $this->backdropLogout($this->admin_user);
  $this->backdropLogin($this->admin_user);
  $this->backdropPost('node/add/page', $edit, t('Save'));
  $node = $this->backdropGetNodeByTitle($title_de);
  // DE: "ü" -> "ue", "ß" -> "ss", "ö" -> "oe".
  // cspell:disable-next-line
  $this->assertEntityAlias('node', $node, 'content/lueckenbuesser-stoeren-de');
  config_set('system.core', 'language_default', 'en');
  $edit['title'] = $title_en;
  $this->backdropPost('node/add/page', $edit, t('Save'));
  $node = $this->backdropGetNodeByTitle($title_en);
  // EN: "ü" -> "u", "ß" -> "ss", "ö" -> "o".
  // cspell:disable-next-line
  $this->assertEntityAlias('node', $node, 'content/luckenbusser-storen-en');
}