PHP code example of mockarena / leo-mockarena

1. Go to this page and download the library: Download mockarena/leo-mockarena library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mockarena / leo-mockarena example snippets


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]);
});