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 871
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);
  $title_de = 'Lückenbüßer stören DE';
  $title_en = 'Lückenbüßer stören EN';
  $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".
  $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".
  $this->assertEntityAlias('node', $node, 'content/luckenbusser-storen-en');
}