Skip to content

Commit 197ad2d

Browse files
authored
Update README.md
1 parent c566ca4 commit 197ad2d

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,15 @@ You can install the package via composer:
1616
composer require phpjuice/pest-plugin-vcr --dev
1717
```
1818

19-
## Usage
20-
21-
To make this plugin functionality available, we need to let Pest know that it should use it.
22-
23-
We will do this by adding the following to your `Pest.php`:
19+
Add new folder inside tests to store cassettes:
2420

25-
```php
26-
use PHPJuice\PestPluginVcr\PestPluginVcr;
27-
28-
Pest\Plugin::uses(PestPluginVcr::class);
21+
```bash
22+
mkdir tests/cassettes
2923
```
3024

31-
## Example
25+
## Usage
3226

33-
The following testsuite, will first send a request to `pestphp.com` and
34-
Record your test suite's HTTP interactions into a cassette and replay them
35-
during future test runs for fast, deterministic, accurate tests...
27+
This plugin will provide you with two handy functions `vcrTurnOn` & `vcrTurnOff` to turn on and off the http recording :
3628

3729
```php
3830
it('records requests to pestphp.com', function () {
@@ -47,6 +39,13 @@ it('records requests to pestphp.com', function () {
4739
vcrTurnOff();
4840
});
4941
```
42+
43+
The previous testsuite, will first send a request to `pestphp.com` and
44+
Record your test suite's HTTP interactions into a cassette and replay them
45+
during future test runs for fast, deterministic, accurate tests.
46+
47+
> **Important** before running your tests make sure to have the following folder `tests/cassettes`
48+
5049
### Testing
5150

5251
```bash

0 commit comments

Comments
 (0)