Record your test suite's HTTP interactions and replay them during future test runs.
Via Composer
$ composer require --dev php-http/vcr-plugin
<?php use Http\Client\Plugin\Vcr\NamingStrategy\PathNamingStrategy; use Http\Client\Plugin\Vcr\Recorder\FilesystemRecorder; use Http\Client\Plugin\Vcr\RecordPlugin; use Http\Client\Plugin\Vcr\ReplayPlugin; $namingStrategy = new PathNamingStrategy(); $recorder = new FilesystemRecorder('some/dir/in/vcs'); // You can use InMemoryRecorder as well // To record responses: $record = new RecordPlugin($namingStrategy, $recorder); // To replay responses: $replay = new ReplayPlugin($namingStrategy, $recorder);
$ composer test $ composer test-static
Please see our contributing guide.
If you discover any security related issues, please contact us at security@php-http.org.
The MIT License (MIT). Please see License File for more information.