phpstan-mockery icon indicating copy to clipboard operation
phpstan-mockery copied to clipboard

PHPStan extension for Mockery

Results 11 phpstan-mockery issues
Sort by recently updated
recently updated
newest added
trafficstars

## Config Migration Needed - [ ] Select this checkbox to let Renovate create an automated Config Migration PR. This issue lists Renovate updates and detected dependencies. Read the [Dependency...

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [slevomat/coding-standard](https://togithub.com/slevomat/coding-standard) | require-dev | major | `^7.0` -> `^8.0` | ---...

`Mockery::mock()` returns a `Mockery\MockInterface`. `MockInterface::shouldReceive()` et al returns an `Mockery\Expectation`, which in turn has a `getMock()` method to return the `MockInterface` the `Expectation` belongs to. The problem is that phpstan...

similar to https://github.com/phpstan/phpstan-mockery/issues/3 I am still experiencing the following code as failing on `0.11.2` ``` $mock = Mockery::mock(Something::class); $mock ->shouldReceive('foo') ->andReturn(null) ->shouldReceive('bar'); ``` Currently, the second shouldReceive call will trigger...

https://phpstan.org/r/4d0416f7-0b46-471e-b961-a685a5fab277 Current versions report an error ``` Parameter #1 $callback of static method Closure::fromCallable() expects callable(): mixed, Mockery\MockInterface given. ```

Hi I am using PHPStan version **0.12.2** and phpstan/phpstan-mockery version **0.12.3**. My code looks like this: ``` $validatorMock = \Mockery::spy('alias:' . Validator::class); $validatorMock->shouldReceive(['isValueValid' => false]); ``` I am mocking Validator...

```php class Foo { protected function bar() { echo 'bar'; } } $mock = \Mockery::mock(Foo::class); $mock ->shouldAllowMockingProtectedMethods() ->makePartial(); $mock->bar(); ``` > Call to protected method bar() phpstan/phpstan v0.12.25 phpstan/phpstan-mockery v0.12.5

```php $mock = Mockery::mock(MyClass::class); $expectCall = $mock->expect('call'); self::assertSth($expectCall); ... private function assertSth(Expectation $expectCall) : void { $expectCall->once(); } ``` Gives > Parameter #1 $expectCall of method Ns\ClassTest::assertSth() expects Mockery\Expectation, PHPStan\Mockery\Type\Expects...

This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [phpunit/phpunit](https://phpunit.de/) ([source](https://redirect.github.com/sebastianbergmann/phpunit)) | `^9.6` -> `^11.0` | [![age](https://developer.mend.io/api/mc/badges/age/packagist/phpunit%2fphpunit/11.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |...

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Eomm/why-don-t-you-tweet](https://redirect.github.com/Eomm/why-don-t-you-tweet) | action | major | `v1` -> `v2` | --- ### Release...