Problem/Motivation

It looks like the $map variable here is never used: https://git.drupalcode.org/project/drupal/-/blob/9ef9b0f7d85f6ceb2652ff8...

I think this commit removed the code that was using it: https://git.drupalcode.org/project/drupal/-/commit/d617be8cbaf177ddb4704...

Steps to reproduce

Proposed resolution

Remove the variable and make sure the test still passes.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3511869

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Title: Unused variable in AccessManagerTest::setup() » Unused variable in AccessManagerTest::setUp()

sarvjeetsingh made their first commit to this issue’s fork.

prudloff’s picture

Status: Active » Needs review

MR looks OK.

smustgrave’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community
Issue tags: +Novice

This probably would of been a good novice task for first time users, but what's done is done. Confirmed the variable is now gone

Did some research and the variable was added in #2046737: Add a method to the AccessManager that only needs a route name and parameters and was used by

    $this->urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface');
    $this->urlGenerator->expects($this->any())
      ->method('generate')
      ->will($this->returnValueMap($map));

Which has since been updated to modern phpunit

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

  • catch committed aed331a4 on 11.x
    Issue #3511869 by sarvjeetsingh, prudloff: Unused variable in...

Status: Fixed » Closed (fixed)

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