Inherits beta evaluation from parent issue: #2367749: Remove usage of deprecated UrlGeneratorInterface::generateFromPath()

Problem/Motivation

UrlGeneratorInterface::generateFromPath() is deprecated for removal before Drupal 8.0.0 release.

WebTestBase::drupalHead() calls this method directly.

Proposed resolution

Change the drupalHead() method to be like drupalGet() and use $this->buildUrl($path, $options) so that we can start using Url objects in the places that call it.

Remaining tasks

create patch

User interface changes

n/a

API changes

n/a

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
CommentFileSizeAuthor
#7 interdiff-4-6.txt933 bytessdstyles
#7 2558191-6.patch791 bytessdstyles
#4 2558191-4.patch1.63 KBsdstyles

Comments

Mile23 created an issue. See original summary.

pwolanin’s picture

Issue summary: View changes
pwolanin’s picture

Title: Remove usage of UrlGeneratorInterface::generateFromPath() in simpletest module » Remove usage of UrlGeneratorInterface::generateFromPath() in WebTestBase::drupalHead()
sdstyles’s picture

Status: Active » Needs review
StatusFileSize
new1.63 KB

Removed usage of UrlGeneratorInterface::generateFromPath() and replaced it with UrlGeneratorInterface::generateFromRoute()

pwolanin’s picture

Status: Needs review » Needs work

Please limit the patch to the one change suggested in the summary. If you want to also fix assertUrl() the patch is wrong - you need to replace the whole section with the buildUrl() method call, not the one line you changed.

The last submitted patch, 4: 2558191-4.patch, failed testing.

sdstyles’s picture

Status: Needs work » Needs review
StatusFileSize
new791 bytes
new933 bytes
pwolanin’s picture

Status: Needs review » Reviewed & tested by the community

yes

mile23’s picture

Title: Remove usage of UrlGeneratorInterface::generateFromPath() in WebTestBase::drupalHead() » Remove usage of deprecated UrlGeneratorInterface::generateFromPath() in WebTestBase::drupalHead()
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed a2059f6 and pushed to 8.0.x. Thanks!

  • alexpott committed a2059f6 on 8.0.x
    Issue #2558191 by sdstyles: Remove usage of deprecated...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.