2017 © Pedro Peláez
 

library phpstan-mockery

PHPStan Mockery extension

image

phpstan/phpstan-mockery

PHPStan Mockery extension

  • Thursday, July 26, 2018
  • by ondrejmirtes
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHPStan Mockery extension

Build Latest Stable Version License, (*1)

This extension provides the following features:, (*2)

  • Interprets Foo|\Mockery\MockInterface in phpDoc so that it results in an intersection type instead of a union type.
  • Mockery::mock() and Mockery::spy() return an intersection type (see the detailed explanation of intersection types) so that the returned object can be used as both the mock object and the mocked class object.
  • shouldReceive(), allows() and expects() methods can be called on the mock object and they work as expected.

Installation

To use this extension, require it in Composer:, (*3)

composer require --dev phpstan/phpstan-mockery

If you also install phpstan/extension-installer then you're all set!, (*4)

Manual installation
, (*5)

If you don't want to use phpstan/extension-installer, include extension.neon in your project's PHPStan config:, (*6)

includes:
    - vendor/phpstan/phpstan-mockery/extension.neon

, (*7)

The Versions