Skip to content
Snippets Groups Projects

Issue #3409895: [regression] toUrl can incorrectly return edit-form url when another link template shares the canonical url

Closed Issue #3409895: [regression] toUrl can incorrectly return edit-form url when another link template shares the canonical url
1 unresolved thread
Closed Adam Bramley requested to merge issue/drupal-3409895:3409895-regression-tourl-can into 11.x
1 unresolved thread

Closes #3409895

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
111 * Tests the toUrl() method without specifying the $rel parameter.
112 *
113 * toUrl should throw an exception when neither canonical or edit-form rels
114 * exist.
112 115 *
113 116 * @covers ::toUrl
114 117 */
115 public function testToUrlDefault() {
118 public function testToUrlDefaultException(): void {
116 119 $values = ['id' => $this->entityId];
117 120 $entity = $this->getEntity(UrlTestEntity::class, $values);
118 121
119 122 $this->expectException(UndefinedLinkTemplateException::class);
120 123 $this->expectExceptionMessage("Cannot generate default URL because no link template 'canonical' or 'edit-form' was found for the '" . $this->entityTypeId . "' entity type");
121 124 $entity->toUrl();
125 }
  • Adam Bramley added 1 commit
  • Adam Bramley added 1 commit

    added 1 commit

    Compare with previous version

  • Adam Bramley added 1 commit

    added 1 commit

    Compare with previous version

  • Adam Bramley added 1 commit

    added 1 commit

    Compare with previous version

  • Dave Long
  • Adam Bramley added 1 commit

    added 1 commit

    • 96fbfafe - Simplify default link template logic

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading