Problem/Motivation

A likely wrong call to getStatus() in MenuAccessTest leads to PHPStan flagging an error in PHPUnit 10.

$this->getStatus() is a legitimate call in PHPUnit 9 (it indicates the status of the test), but that method does not exist in PHPUnit 10, so PHPStan is flagging it.

However, probably the original test developer meant to get the status code of the request, so that call is just wrong to be there.

Proposed resolution

Get the status code of the request.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3440180

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

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

Good spot, agree that this looks like the intention.

mondrake’s picture

Good spot

PHPStan rules!

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 531147f and pushed to 11.x. Thanks!
Committed 7a518b5 and pushed to 10.3.x. Thanks!

  • alexpott committed 7a518b5e on 10.3.x
    Issue #3440180 by mondrake: Fix wrong getStatus() call in MenuAccessTest...

  • alexpott committed 531147f6 on 11.x
    Issue #3440180 by mondrake: Fix wrong getStatus() call in MenuAccessTest
    

Status: Fixed » Closed (fixed)

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