Download the PHP package chmeldax/phpmocks without Composer
On this page you can find all versions of the php package chmeldax/phpmocks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download chmeldax/phpmocks
More information about chmeldax/phpmocks
Files in chmeldax/phpmocks
Download chmeldax/phpmocks
More information about chmeldax/phpmocks
Files in chmeldax/phpmocks
Vendor chmeldax
Package phpmocks
Short Description Enhanced mocking of PHP classes for testing purposes
License MIT
Homepage https://github.com/chmeldax/phpmocks
Package phpmocks
Short Description Enhanced mocking of PHP classes for testing purposes
License MIT
Homepage https://github.com/chmeldax/phpmocks
Please rate this library. Is it a good library?
Informations about the package phpmocks
PhpMocks
Making mocking a pleasure!
Library to be used for testing classes.
Features
- Stubbing and mocking of all public class methods
- Supports abstract classes and interfaces
- Mocking of static methods
- Different behaviors of the mock based on the method call parameters
- Strict mocking by default (calls to non-mocked method are disabled by default)
- Fluent intuitive interface
Requirements
- PHP 5.6+
- Composer
- allowed
evallanguage construct
Installation
Usage
Stubs
When you want to replace default behavior of the class, but you are not testing
the method calls themselves, then use allowMethodCall().
Specifying return values
Multiple with blocks
See tests/DoubleTest.php for more examples.
Mocks
When you are testing the interaction with class, use expectMethodCall.
It will allow you to specify expected calls.
Checking expectations
It is advised to use tearDown() (or similar method) in your testing framework.
See tests/ExpectedMethodTest.php for more examples.
Things to implement
- Support for PHP 7 (mainly return values, scalar types)
- Implement better Constraints
- Clean the code
- Introduce true unit tests
All versions of phpmocks with dependencies
PHP Build Version
Package Version
Requires
gossi/php-code-generator Version
^0.4.1
The package chmeldax/phpmocks contains the following files
Loading the files please wait ...