Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 737 Bytes

FuncProxy.md

File metadata and controls

28 lines (20 loc) · 737 Bytes

AspectMock\Proxy\FuncProxy

FuncProxy is a wrapper around mocked function, used to verify function calls. Has the same verification methods as InstanceProxy and ClassProxy do.

Usage:

<?php
namespace Acme\User;
$func = test::func('Acme\User', 'strlen', 10);
strlen('hello');
strlen('world');
$func->verifyInvoked(); // true
$func->verifyInvoked(['hello']); // true
$func->verifyInvokedMultipleTimes(2);
$func->verifyNeverInvoked(['bye']);

public verifyInvoked(array $params = null)

public verifyInvokedOnce(array $params = null)

public verifyNeverInvoked(array $params = null)

public verifyInvokedMultipleTimes($times, array $params = null)

public getCallsForMethod($func)