2017 © Pedro PelĆ”ez
 

library 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). 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.

image

elmpp/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). 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.

  • Tuesday, March 1, 2016
  • by elmpp
  • Repository
  • 0 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 317 Forks
  • 0 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

Mockery

Build Status Latest Stable Version Total Downloads, (*1)

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., (*2)

Mockery is released under a New BSD License., (*3)

The current released version on Packagist is 0.9.4. The current released version for PEAR is 0.9.0. Composer users may instead opt to use the current master branch aliased to 1.0.x-dev., (*4)

Installation

To install Mockery, run the command below and you will get the latest version, (*5)

composer require --dev mockery/mockery

If you want to run the tests:, (*6)

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 will go offline permanently no earlier than 30 June 2015., (*7)

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., (*8)

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., (*9)

Prerequisites

Mockery requires PHP 5.3.2 or greater for versions 0.9.4 or lower. The current master and future versions will use PHP 5.4 at minimum. This is subject to change as PHP versions reach their published end of life dates., (*10)

Documentation

The current version can be seen at docs.mockery.io., (*11)

The Versions

01/03 2016

dev-master

9999999-dev http://github.com/elmpp/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). 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.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

bdd tdd test mock stub test double mockery testing library mock objects

02/04 2015

0.9.4

0.9.4.0 http://github.com/padraic/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). 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.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

bdd tdd test mock stub test double mockery testing library mock objects

22/01 2015

dev-test-double-api

dev-test-double-api http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2
  • lib-pcre >=7.0

 

The Development Requires

bdd tdd test mock stub test double mockery testing library mock objects

22/12 2014

0.9.3

0.9.3.0 http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2
  • lib-pcre >=7.0

 

The Development Requires

bdd tdd test mock stub test double mockery testing library mock objects

03/09 2014

0.9.2

0.9.2.0 http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2
  • lib-pcre >=7.0

 

The Development Requires

bdd tdd test mock stub test double mockery testing library mock objects

02/05 2014

0.9.1

0.9.1.0 http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2
  • lib-pcre >=7.0

 

The Development Requires

bdd tdd test mock stub test double mockery testing library mock objects

05/02 2014

0.9.0

0.9.0.0 http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2
  • lib-pcre >=7.0

 

The Development Requires

bdd tdd test mock stub test double mockery testing library mock objects

25/04 2013

dev-simplify-stub-dsl

dev-simplify-stub-dsl http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

  • hamcrest/hamcrest 1.1.0

bdd tdd test mock stub test double mockery testing library mock objects

01/04 2013

0.8.0

0.8.0.0 http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

  • hamcrest/hamcrest 1.1.0

bdd tdd test mock stub test double mockery testing library mock objects

19/03 2013

dev-php-parser

dev-php-parser http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

  • hamcrest/hamcrest 1.1.0

bdd tdd test mock stub test double mockery testing library mock objects

04/02 2013

dev-generator-fail

dev-generator-fail http://github.com/padraic/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 succint 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.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

  • hamcrest/hamcrest 1.1.0

bdd tdd test mock stub test double mockery testing library mock objects

24/01 2012

0.7.2

0.7.2.0 http://github.com/padraic/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 succint 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.

  Sources   Download

New BSD

The Requires

  • php >=5.3.2

 

bdd tdd test mock stub test double mockery testing library mock objects