Description
Phake is a framework for PHP that aims to provide mock objects, test doubles
and method stubs.
Phake was inspired by a lack of flexibility and ease of use in the current
mocking frameworks combined with a recent experience with Mockito for Java.
A key conceptual difference in mocking between Phake and most of php mocking
frameworks (ie: mock functionality in PHPUnit, PHPMock, and mock functionality
in SimpleTest) is that Phake (like Mockito) employs a verification strategy to
ensure that calls get made. That is to say, you call your code as normal and
then after you have finished the code being tested you can verify whether or
not expected methods were called. This is very different from the
aforementioned products for php which use an expectation strategy where you
lay out your expectations prior to any calls being made.
Phake alternatives and similar libraries
Based on the "Testing" category.
Alternatively, view Phake alternatives based on common mentions on social networks and blogs.
-
Mockery
Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). -
php-webdriver
PHP client for Selenium/WebDriver protocol. Previously facebook/php-webdriver -
VFS Stream
vfsStream is a stream wrapper for a virtual file system that may be helpful in unit tests to mock the real file system. It can be used with any unit test framework, like PHPUnit or SimpleTest. -
Kahlan
:heavy_check_mark: PHP Test Framework for Freedom, Truth, and Justice -
AspectMock
The most powerful and flexible mocking framework for PHPUnit / Codeception. -
HTTP Mock
Mock HTTP requests on the server side in your PHP unit tests -
PHP-Mock: mocking built-in PHP functions
Mock built-in PHP functions (e.g. time(), exec() or rand()) -
Steward
PHP libraries that makes Selenium WebDriver + PHPUnit functional testing easy and robust
Updating dependencies is time-consuming.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Phake or a related project?