Skip to content

[PHPUnit12] Skip used as next arg with MockObject Type on ExpressionCreateMockToCreateStubRector#670

Merged
TomasVotruba merged 13 commits intomainfrom
skip-exp
Apr 29, 2026
Merged

[PHPUnit12] Skip used as next arg with MockObject Type on ExpressionCreateMockToCreateStubRector#670
TomasVotruba merged 13 commits intomainfrom
skip-exp

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik samsonasik commented Apr 29, 2026

When used as MockObject on next arg with MockObject type, it should be skipped:

    public function test()
    {
        $mock = $this->createMock(ClassWithDependency::class);
        $this->configureMock($mock);
    }

    private function configureMock(\PHPUnit\Framework\MockObject\MockObject $mock)
    {
        $mock->method('someMethod')->willReturn(1);
    }

we have this case on our project ;)

@samsonasik samsonasik requested a review from TomasVotruba April 29, 2026 08:26
@samsonasik
Copy link
Copy Markdown
Member Author

@TomasVotruba ready 👍

@TomasVotruba TomasVotruba merged commit 7ee9617 into main Apr 29, 2026
7 checks passed
@TomasVotruba
Copy link
Copy Markdown
Member

LGTM

@TomasVotruba TomasVotruba deleted the skip-exp branch April 29, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants