/**
* Tests language unspecific aliases are shown and saved in the node form.
*/
public function testNotSpecifiedNode() { // Create test node.
$node =
$this->
drupalCreateNode();
// Create a language-unspecific alias in the admin UI, ensure that is
// displayed and the langcode is not changed when saving.
$edit =
[ 'path[0][value]' => '/node/' .
$node->
id(),
'alias[0][value]' => '/' .
$this->
getRandomGenerator()->
word(8
),
'langcode[0][value]' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
];
$this->
drupalGet('admin/config/search/path/add'
);
$this->
submitForm($edit, 'Save'
);
$this->
drupalGet($node->
toUrl('edit-form'
));
$this->
assertSession()->
fieldValueEquals('path[0][alias]',
$edit['alias[0][value]'
]);
$this->
submitForm([], 'Save'
);
$this->
drupalGet('admin/config/search/path'
);
$this->
assertSession()->
pageTextContains('None'
);