
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
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:
- 3440180-fix-wrong-getstatus
changes, plain diff MR !7450
Comments
Comment #3
mondrakeComment #4
longwaveGood spot, agree that this looks like the intention.
Comment #5
mondrakePHPStan rules!
Comment #6
alexpottCommitted 531147f and pushed to 11.x. Thanks!
Committed 7a518b5 and pushed to 10.3.x. Thanks!