Problem/Motivation
I've stumbled over the following inspection in the PHPStorm plugin "Php Inspections (EA Extended)" called "promote ->willReturn*".
This points out PHPUnit MockObject ->expects()->will() which have $this->returnValue (and friends) as a stub and replaces them with ->expects()->willReturn() (and friends).
As seen in #3220128: [META] ->willReturn(...) would make more sense here (and friends) getting all of this committed in one go is way too much.
This sub-issue is about getting all ->willReturn(...)
in, except ->willReturn()
itself.
Remaining tasks
-
Patch/MR - Review
- Commit
- Rejoice
Issue fork drupal-3221312
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:
- 3221312--willreturnsomething-would-make changes, plain diff MR !867
Comments
Comment #2
SpokjeComment #4
SpokjeThis seems like a manageable chunk to review.
Comment #5
SpokjeComment #6
joachim CreditAttribution: joachim as a volunteer commentedLGTM.
Comment #9
catchCommitted/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!