All Projects → phake → phake

phake / phake

Licence: other
PHP Mocking Framework

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to phake

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).
Stars: ✭ 10,048 (+2065.52%)
Mutual labels:  mock, phpunit, stub, test-doubles
mock
Utilities to help mock behavior, spy on function calls, stub methods, and fake time for tests.
Stars: ✭ 31 (-93.32%)
Mutual labels:  mock, stub, spy
mocka
Mocka - The complete testing framework for LUA and Nginx
Stars: ✭ 26 (-94.4%)
Mutual labels:  mock, stub, spy
stub-server
Stub server for REST APIs
Stars: ✭ 14 (-96.98%)
Mutual labels:  mock, stub
DeepfakeHTTP
DeepfakeHTTP is a web server that uses HTTP dumps as a source for responses.
Stars: ✭ 373 (-19.61%)
Mutual labels:  mock, stub
Mockingbird
Simplify software testing, by easily mocking any system using HTTP/HTTPS, allowing a team to test and develop against a service that is not complete or is unstable or just to reproduce planned/edge cases.
Stars: ✭ 149 (-67.89%)
Mutual labels:  mock, stub
spydriver
🕵️ Lightweight utility to intercept WebDriver and WebElement method calls.
Stars: ✭ 24 (-94.83%)
Mutual labels:  mock, spy
aem-stubs
Tool for providing sample data for AEM applications in a simple and flexible way. Stubbing server on AEM, no separate needed.
Stars: ✭ 40 (-91.38%)
Mutual labels:  mock, stub
sinon-mongoose
Extend Sinon stubs for Mongoose methods to test chained methods easily
Stars: ✭ 87 (-81.25%)
Mutual labels:  mock, stub
Rubicon
Swift parser + mock generator
Stars: ✭ 42 (-90.95%)
Mutual labels:  mock, spy
node-mock-examples
Examples of tests that mock Node system APIs: fs, http, child_process, timers
Stars: ✭ 38 (-91.81%)
Mutual labels:  mock, stub
Spy
Clojure/ClojureScript library for stubs, spies and mocks.
Stars: ✭ 131 (-71.77%)
Mutual labels:  mock, stub
Php Mock Phpunit
Mock built-in PHP functions (e.g. time() or rand()) in PHPUnit.
Stars: ✭ 121 (-73.92%)
Mutual labels:  mock, phpunit
mock-spy-module-import
JavaScript import/require module testing do's and don'ts with Jest
Stars: ✭ 40 (-91.38%)
Mutual labels:  stub, spy
Mockit
A tool to quickly mock out end points, setup delays and more...
Stars: ✭ 1,534 (+230.6%)
Mutual labels:  mock, stub
ts-mock-imports
Intuitive mocking library for Typescript class imports
Stars: ✭ 103 (-77.8%)
Mutual labels:  mock, stub
Impersonator
Ruby library to record and replay object interactions
Stars: ✭ 100 (-78.45%)
Mutual labels:  mock, stub
Mimic
A mocking library for Elixir
Stars: ✭ 104 (-77.59%)
Mutual labels:  mock, stub
FireMock
Mock and stub HTTP requests. Test your apps with fake data and files responses.
Stars: ✭ 25 (-94.61%)
Mutual labels:  mock, stub
InstantMock
Create mocks easily in Swift
Stars: ✭ 88 (-81.03%)
Mutual labels:  mock, stub

Phake

Tests Latest Stable Version Total Downloads License

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.

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.

If you have an article or tutorial that you would like to share, feel free to open an issue on github and I will add it to this list

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].