VCR Plugin
, (*1)
Record your test suite's HTTP interactions and replay them during future test runs., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require --dev php-http/vcr-plugin, (*4)
## Usage
```php
<?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);
Testing
bash
$ composer test
$ composer test-static
, (*5)
Contributing
Please see our contributing guide., (*6)
Security
If you discover any security related issues, please contact us at security@php-http.org., (*7)
License
The MIT License (MIT). Please see License File for more information., (*8)