Phake - PHP Mocking Framework
2.1
Introduction to Phake
Getting Started
Creating Mocks
Method Stubbing
Method Verification
Mocking Static Methods
Answers
Method Parameter Matchers
Configuration
Phake - PHP Mocking Framework
Docs
»
Welcome to Phake - PHP Mocking Framework’s documentation!
Edit on GitHub
Welcome to Phake - PHP Mocking Framework’s documentation!
¶
Introduction to Phake
Getting Started
Composer Install
Install from Source
Support
Creating Mocks
Partial Mocks
Calling Private and Protected Methods on Mocks
Method Stubbing
How Phake::when() Works
Overwriting Existing Stubs
Resetting A Mock’s Stubs
Stubbing Multiple Calls
Stubbing Consecutive Calls
Stubbing Reference Parameters
Partial Mocks
Setting Default Stubs
Stubbing Magic Methods
Method Verification
Verifying Method Parameters
Verifying Multiple Invocations
Verifying Calls Happen in a Particular Order
Verifying No Interaction with a Mock so Far
Verifying No Further Interaction with a Mock
Verifying No Unverified Interaction with a Mock
Verifying Magic Methods
Mocking Static Methods
Answers
Throwing Exceptions
Calling the Parent
Capturing a Return Value
Answer Callbacks
Custom Answers
Method Parameter Matchers
Using PHPUnit Matchers
Using Hamcrest Matchers
Wildcard Parameters
Parameter Capturing
Custom Parameter Matchers
Configuration
Setting the Phake Client
Setting the Mock Class Loader
Indices and tables
¶
Index
Module Index
Search Page