1.3
What's Changed
Added tracing for mocked functions calls.
namespace Xepozz\InternalMocker\Tests\Integration;
final class UseInSucceedDataProviderStub
{
public function run(string $value): string
{
return serialize($value);
}
}
$object = new UseInSucceedDataProviderStub();
$object->run('test');
$object->run('test2');
$object->run('test3');
$traces = MockerState::getTraces(
__NAMESPACE__,
'serialize',
);
$traces
will contain an array of arrays with the following structure:
[
[
'arguments' => ['test'],
'trace' => [...],
'result' => "s:4:"test";",
],
[
'arguments' => ['test2'],
'trace' => [...],
'result' => "s:5:"test2";",
],
[
'arguments' => ['test3'],
'trace' => [...],
'result' => "s:5:"test3";",
],
]
Full Changelog: 1.2...1.3