Download the PHP package phpstan/phpstan-mockery without Composer
On this page you can find all versions of the php package phpstan/phpstan-mockery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package phpstan-mockery
PHPStan Mockery extension
This extension provides the following features:
Mockery::mock(),Mockery::spy(), andMockery::namedMock()return an intersection type (e.g.Foo&MockInterface) so that the mock can be used as both the mocked class and a mock object. See the detailed explanation of intersection types.- Interprets
Foo|\Mockery\MockInterfacein phpDoc so that it results in an intersection type instead of a union type. This can be disabled by setting themockery.convertUnionToIntersectionTypeparameter tofalse. shouldReceive(),shouldNotReceive(),shouldHaveReceived(),shouldNotHaveReceived(),allows(), andexpects()methods are understood on mock objects.makePartial()andshouldAllowMockingProtectedMethods()returnstatic, preserving the intersection type for chained calls.- Alias (
alias:) and overload (overload:) mock prefixes are handled. - Partial mock syntax (
ClassName[methodName]) is supported. - Multiple interfaces passed as comma-separated strings or as separate arguments are resolved.
- Constructor argument arrays passed to
mock()are handled correctly.
Installation
To use this extension, require it in Composer:
If you also install phpstan/extension-installer then you're all set!
Manual installation
If you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:All versions of phpstan-mockery with dependencies
PHP Build Version
Package Version
The package phpstan/phpstan-mockery contains the following files
Loading the files please wait ...