icewind/replay

Record and replay php requests

dev-master 2015-10-24 15:15 UTC

This package is auto-updated.

Last update: 2024-10-18 17:30:16 UTC


README

Build Status Scrutinizer Code Quality Code Coverage

Record and replay php requests

composer require icewind/replay

Records input from builtin php functions to allow replaying the request from the exact same state.

Note, only code using namespaces can be replayed

Usage

Record

php rec.php script.php new_recording.json

Or

require 'vendor/autoload.php';

$replay = new \Icewind\Replay\Replay();
$record = $replay->record('script.php');
$record->save('new_recording.json');

Playback

php play.php script.php existing_recording.json

Or

require 'vendor/autoload.php';

$replay = new \Icewind\Replay\Replay();
$record = new \Icewind\Replay\Record\JsonRecord('existing_recording.json');
$record = $replay->play('script.php', $record);

TODO

  • Support recording/replaying input from builtin classes (PDO)