2017 © Pedro Peláez
 

library mockarena

A function mocking utility for PHP

image

mockarena/mockarena

A function mocking utility for PHP

  • Wednesday, October 19, 2016
  • by mrkrstphr
  • Repository
  • 0 Watchers
  • 0 Stars
  • 549 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 13 % Grown

The README.md

heyyyyyyy mockarena

Builds, (*1)

A function mocking utility for PHP, (*2)

, (*3)

This library allows for mocking non-existent functions so that they can exist during tests, and their invocation be tracked and evaluated., (*4)

Example

$mocker = new \Mockarena\Mockarena();
$fn = $mocker->mock('add_filter');

add_filter('login_url', 'some_func');

assert(count($fn->calls) === 1);
assert($fn->calls[0] == ['login_url', 'some_func']);

$fn->calledWith(1, 2)->willReturn(300);

$result = add_filter(1, 2);

assert($result === 300);

The Versions

19/10 2016

dev-master

9999999-dev

A function mocking utility for PHP

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

19/10 2016

1.1.2

1.1.2.0

A function mocking utility for PHP

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

04/08 2016

1.1.1

1.1.1.0

A function mocking utility for PHP

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

04/08 2016

1.1.0

1.1.0.0

A function mocking utility for PHP

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

15/07 2016

1.0.1

1.0.1.0

A function mocking utility for PHP

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

12/07 2016

1.0.0

1.0.0.0

A function mocking utility for PHP

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires