Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phake/phake
PHP Mocking Framework
https://github.com/phake/phake
framework mock php phpunit spy stub test-doubles testing
Last synced: about 15 hours ago
JSON representation
PHP Mocking Framework
- Host: GitHub
- URL: https://github.com/phake/phake
- Owner: phake
- License: other
- Created: 2010-01-04T15:22:10.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2024-11-28T17:55:07.000Z (14 days ago)
- Last Synced: 2024-11-29T12:58:41.926Z (13 days ago)
- Topics: framework, mock, php, phpunit, spy, stub, test-doubles, testing
- Language: PHP
- Homepage: https://phake.github.io
- Size: 7.69 MB
- Stars: 479
- Watchers: 22
- Forks: 87
- Open Issues: 17
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-php - Phake - Another mock object library for testing. (Table of Contents / Testing)
- awesome-projects - Phake - Another mock object library for testing. (PHP / Testing)
- awesome-php - Phake - Another mock object library for testing. (Table of Contents / Testing)
- awesome-php-cn - Phake - 另一个模拟对象库进行测试. (目录 / 测试 Testing)
README
Phake
=======
[![Tests](https://github.com/phake/phake/actions/workflows/tests.yml/badge.svg)](https://github.com/phake/phake/actions/workflows/tests.yml)
[![Latest Stable Version](https://poser.pugx.org/phake/phake/v/stable.png)](https://packagist.org/packages/phake/phake)
[![Total Downloads](https://poser.pugx.org/phake/phake/downloads.png)](https://packagist.org/packages/phake/phake)
[![License](https://poser.pugx.org/phake/phake/license.png)](https://packagist.org/packages/phake/phake)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.Installation - Composer
-----------------------Phake can be installed using [Composer](https://github.com/composer/composer).
```
composer require --dev phake/phake
```Installation - Source
---------------------You can also of course install it from source by downloading it from our github repository: https://github.com/phake/phake
Links
-------------There are a few links that have information on how you can utilize Phake.
* [Phake Website](https://phake.github.io)
* [Phake Documentation](https://phake.github.io/doc/)
* [Initial Phake Announcement](https://web.archive.org/web/20101230174850/http://digitalsandwich.com/archives/84-introducing-phake-mocking-framework.html)
* [PHPStorm Plugin](https://plugins.jetbrains.com/plugin/17261-phake)If you have an article or tutorial that you would like to share, feel free to open an [issue](https://github.com/phake/phake/issues) on github and I will add it to this list