Skip to content

Releases: xepozz/internal-mocker

1.4

01 Mar 05:39
ac35931
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.3...1.4

1.3

24 Feb 09:03
cb92342
Compare
Choose a tag to compare
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

1.2

22 Dec 07:45
aac7c60
Compare
Choose a tag to compare
1.2

What's Changed

Full Changelog: 1.1...1.2

First release

15 Apr 05:08
Compare
Choose a tag to compare
1.0

Rename package