Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHPUnit] Add RemoveExpectAnyFromMockRector #1301

Merged
merged 1 commit into from
Apr 6, 2019

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Apr 6, 2019

Closes #1298

use PHPUnit\Framework\TestCase;
class SomeClass extends TestCase
{
    public function test()
    {
        $translator = $this->getMock('SomeClass');
-       $translator->expects($this->any())
+       $translator
            ->method('trans')
            ->willReturn('translated max {{ max }}!');
    }
}

@TomasVotruba TomasVotruba force-pushed the phpunit-code-quality branch from 0318cad to 14c3251 Compare April 6, 2019 18:12
@TomasVotruba TomasVotruba merged commit 1f3501a into master Apr 6, 2019
@TomasVotruba TomasVotruba deleted the phpunit-code-quality branch April 6, 2019 18:27
TomasVotruba added a commit that referenced this pull request Nov 25, 2021
rectorphp/rector-src@9ba0f63 [DeadCode] Add RemoveUnusedParamInRequiredAutowireRector (#1301)
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.

1 participant