diff --git a/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php b/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php index a174e31..dfd44ad 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php @@ -91,4 +91,12 @@ protected function actions(array $form, array &$form_state) { return $actions; } + /** + * {@inheritdoc} + */ + public function validate(array $form, array &$form_state) { + // Overwrite the default validation implementation as it is not necessary + // nor possible to validate an entity in a confirmation form. + } + } diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php index f2cdcbe..29c9424 100644 --- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php @@ -73,11 +73,11 @@ public function testShortcutLinkAdd() { $shortcuts = $saved_set->getShortcuts(); foreach ($shortcuts as $entity) { // Test the node routes with parameters. - if (strpos($entity->route_name->value, 'node.') === 0) { + if (strpos($entity->link->route_name, 'node.') === 0) { $entity->save(); $loaded = Shortcut::load($entity->id()); - $this->assertEqual($entity->route_name->value, $loaded->route_name->value); - $this->assertEqual($entity->get('route_parameters')->first()->getValue(), $loaded->get('route_parameters')->first()->getValue()); + $this->assertEqual($entity->link->route_name, $loaded->link->route_name); + $this->assertEqual($entity->link->route_parameters, $loaded->link->route_parameters); } } } @@ -124,7 +124,7 @@ public function testShortcutLinkRename() { $shortcuts = $set->getShortcuts(); $shortcut = reset($shortcuts); - $this->drupalPostForm('admin/config/user-interface/shortcut/link/' . $shortcut->id(), array('title[0][value]' => $new_link_name, 'link[0][url]' => $shortcut->getUrl()->toString()), t('Save')); + $this->drupalPostForm('admin/config/user-interface/shortcut/link/' . $shortcut->id(), array('title[0][value]' => $new_link_name, 'link[0][url]' => ltrim($shortcut->getUrl()->toString(), '/')), t('Save')); $saved_set = ShortcutSet::load($set->id()); $titles = $this->getShortcutInformation($saved_set, 'title'); $this->assertTrue(in_array($new_link_name, $titles), 'Shortcut renamed: ' . $new_link_name);