Loading src/AliasCleaner.php +7 −0 Original line number Diff line number Diff line Loading @@ -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. * Loading tests/src/FunctionalJavascript/PathautoUiTest.php +17 −8 Original line number Diff line number Diff line Loading @@ -96,10 +96,12 @@ class PathautoUiTest extends WebDriverTestBase { $this->submitForm($edit, 'Save'); $this->assertSession()->waitForElementVisible('css', '[name="id"]'); 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.'); Loading Loading @@ -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'); $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->assertSession()->pageTextContains('This action cannot be undone.'); $this->submitForm([], 'Delete'); } $this->assertSession()->pageTextContains('The pathauto pattern Test has been deleted.'); $this->assertEmpty(PathautoPattern::load('page_pattern')); Loading Loading
src/AliasCleaner.php +7 −0 Original line number Diff line number Diff line Loading @@ -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. * Loading
tests/src/FunctionalJavascript/PathautoUiTest.php +17 −8 Original line number Diff line number Diff line Loading @@ -96,10 +96,12 @@ class PathautoUiTest extends WebDriverTestBase { $this->submitForm($edit, 'Save'); $this->assertSession()->waitForElementVisible('css', '[name="id"]'); 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.'); Loading Loading @@ -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'); $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->assertSession()->pageTextContains('This action cannot be undone.'); $this->submitForm([], 'Delete'); } $this->assertSession()->pageTextContains('The pathauto pattern Test has been deleted.'); $this->assertEmpty(PathautoPattern::load('page_pattern')); Loading