GithubHelp home page GithubHelp logo

rickwong / phake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phake/phake

1.0 3.0 0.0 6.67 MB

Fork of mlively/Phake

License: Other

Shell 0.38% XML 90.44% Ruby 0.13% Python 0.11% Perl 0.03% Graphviz (DOT) 0.47% JavaScript 2.46% PHP 5.99%

phake's Introduction

Phake

Build Status

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.

  1. Add Phake as a dependency.
"require": {
	"phake/phake": "dev-master"
}
  1. Run Composer: php composer.phar install or php composer.phar update

Installation - PEAR

Phake can be installed using PEAR via the Digital Sandwich PEAR channel

This pear channel can be added to PEAR with the following command:

pear channel-discover pear.digitalsandwich.com

You should only need to do that once. After this you can install Phake with the following command

pear install digitalsandwich/Phake

After the installation you can find the Phake source files inside your local PEAR directory

Installation - Source

You can also of course install it from source by downloading it from our github repository: https://github.com/mlively/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

phake's People

Contributors

beberlei avatar bfeaver avatar dynom avatar iteman avatar marekkalnik avatar mlively avatar ngyuki avatar pborreli avatar rickwong avatar sebastianbergmann avatar seldaek avatar yuya-takeyama avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.