mockarena/leo-mockarena

An extension to Leo for writing assertions with Mockarena

1.2.1 2016-09-07 19:51 UTC

This package is auto-updated.

Last update: 2024-10-11 06:54:11 UTC


README

Builds

Extends Leo's matcher library with helpers for evaluating Mockarena mocks.

Example

it('should add a login_url filter', function () {
    $fn = $this->mocker->mock('add_filter');
    $class = new WPSingleSignOn($this->apiClient->reveal());

    expect($fn)->to->have->been->called(1);
    expect($fn)->calls(0)->to->have->arguments(['login_url', [$class, 'redirectToProvider'], 10, 2]);
});