icewind / replay
记录和回放PHP请求
dev-master
2015-10-24 15:15 UTC
Requires
- icewind/patcher: ^0.4.0
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is auto-updated.
Last update: 2024-09-18 17:18:08 UTC
README
记录和回放PHP请求
composer require icewind/replay
记录内置PHP函数的输入,以便从完全相同的状态回放请求。
注意,只有使用命名空间的代码才能回放
使用方法
记录
php rec.php script.php new_recording.json
或
require 'vendor/autoload.php'; $replay = new \Icewind\Replay\Replay(); $record = $replay->record('script.php'); $record->save('new_recording.json');
回放
php play.php script.php existing_recording.json
或
require 'vendor/autoload.php'; $replay = new \Icewind\Replay\Replay(); $record = new \Icewind\Replay\Record\JsonRecord('existing_recording.json'); $record = $replay->play('script.php', $record);
待办事项
- 支持记录/回放内置类(PDO)的输入