Giter VIP home page Giter VIP logo

baiyinnamula / mockery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mockery/mockery

0.0 1.0 0.0 2.24 MB

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 succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL).

License: Other

PHP 99.80% Shell 0.20%

mockery's Introduction

Mockery

Build Status Latest Stable Version Total Downloads

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). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.

Mockery is released under a New BSD License.

The current released version on Packagist is 0.9.4. Composer users may opt to use 0.9.* for the current stable package, or ~1.0@dev for the current master branch. Latest version released through PEAR was 0.9.0; channel is now closed.

Installation

To install Mockery, run the command below and you will get the latest version

composer require --dev mockery/mockery

If you want to run the tests:

vendor/bin/phpunit

####Note

The current Mockery 0.9.4 release is the final version to have PHP 5.3 as a minimum requirement. The minimum PHP requirement has been moved to PHP 5.4 for future releases. Also, the PEAR channel has gone offline permanently since 30 June 2015.

Mock Objects

In unit tests, mock objects simulate the behaviour of real objects. They are commonly utilised to offer test isolation, to stand in for objects which do not yet exist, or to allow for the exploratory design of class APIs without requiring actual implementation up front.

The benefits of a mock object framework are to allow for the flexible generation of such mock objects (and stubs). They allow the setting of expected method calls and return values using a flexible API which is capable of capturing every possible real object behaviour in way that is stated as close as possible to a natural language description.

Prerequisites

Mockery requires PHP 5.3.2 or greater for versions 0.9.4 or lower. The current master and future versions are using PHP 5.4 at minimum. This is subject to change as PHP versions reach their published end of life dates.

Documentation

The current version can be seen at docs.mockery.io.

mockery's People

Contributors

adambrett avatar agiledivider avatar alexdenvir avatar asmblah avatar beni0888 avatar bilge avatar davedevelopment avatar david0 avatar dcousineau avatar demsey2 avatar duncan3dc avatar fgruntjes avatar fhinkel avatar fredemmott avatar gordalina avatar grahamcampbell avatar igorw avatar jean85 avatar karptonite avatar lytc avatar nobuf avatar padraic avatar robertbasic avatar shieldo avatar srosato avatar trowski avatar villfa avatar wmeldon avatar wouterj avatar yugeon avatar

Watchers

 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.