diff --git a/src/AliasCleaner.php b/src/AliasCleaner.php index 20cdb6d5aa5568101529eca458e3e2b978fddbe5..14c515bcfb43771e0f338eefe6736935b1b2b3a1 100644 --- a/src/AliasCleaner.php +++ b/src/AliasCleaner.php @@ -70,6 +70,13 @@ class AliasCleaner implements AliasCleanerInterface { */ protected $moduleHandler; + /** + * An array of arrays for punctuation values. + * + * @var array + */ + protected $punctuationCharacters = []; + /** * Creates a new AliasCleaner. * diff --git a/tests/src/FunctionalJavascript/PathautoUiTest.php b/tests/src/FunctionalJavascript/PathautoUiTest.php index e814b2c2b1b946c41cb84f4bd91ed806b23e8236..84c81f76fc5be9c56cfcb4b311ae0db2b85aa0ea 100644 --- a/tests/src/FunctionalJavascript/PathautoUiTest.php +++ b/tests/src/FunctionalJavascript/PathautoUiTest.php @@ -96,10 +96,12 @@ class PathautoUiTest extends WebDriverTestBase { $this->submitForm($edit, 'Save'); $this->assertSession()->waitForElementVisible('css', '[name="id"]'); - $edit += [ - 'id' => 'page_pattern', - ]; - $this->submitForm( $edit, 'Save'); + if (version_compare(\Drupal::VERSION, '10.1', '<')) { + $edit += [ + 'id' => 'page_pattern', + ]; + $this->submitForm($edit, 'Save'); + } $this->assertSession()->pageTextContains('Path pattern is using the following invalid tokens: [user:name], [term:name].'); $this->assertSession()->pageTextNotContains('The configuration options have been saved.'); @@ -199,10 +201,17 @@ class PathautoUiTest extends WebDriverTestBase { $this->drupalGet('/admin/config/search/path/patterns'); $session->getPage()->find('css', '.dropbutton-toggle > button')->press(); $this->clickLink('Delete'); - $address = Url::fromRoute('entity.pathauto_pattern.delete_form', ['pathauto_pattern' => 'page_pattern'], [$destination_query]); - $this->assertSession()->addressEquals($address); - $this->assertSession()->pageTextContains('This action cannot be undone.'); - $this->submitForm([], 'Delete'); + $this->assertSession()->assertWaitOnAjaxRequest(); + if (version_compare(\Drupal::VERSION, '10.1', '>=')) { + $this->assertSession()->pageTextContains('This action cannot be undone.'); + $this->getSession()->getPage()->find('css', '.ui-dialog-buttonpane')->findButton('Delete')->press(); + $this->assertSession()->assertWaitOnAjaxRequest(); + } + else { + $address = Url::fromRoute('entity.pathauto_pattern.delete_form', ['pathauto_pattern' => 'page_pattern'], [$destination_query]); + $this->assertSession()->addressEquals($address); + $this->submitForm([], 'Delete'); + } $this->assertSession()->pageTextContains('The pathauto pattern Test has been deleted.'); $this->assertEmpty(PathautoPattern::load('page_pattern'));