Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Strict mode allows recording new cassettes#229

Open
snelg wants to merge 10 commits intophp-vcr:masterfrom
snelg:strict-like-once
Open

Strict mode allows recording new cassettes#229
snelg wants to merge 10 commits intophp-vcr:masterfrom
snelg:strict-like-once

Conversation

@snelg
Copy link

@snelg snelg commented Nov 3, 2017

Context

This is an addition to #228
I think that "strict" mode should behave like "once" mode when the requested cassette does not exist.
The original "strict" implementation has no way to record initial cassettes.
When I need a new cassette (e.g. I create a new TestCase), I have to change my code to setMode('once'), create the cassette, and then change my code back to setMode('strict').
I'm submitting this as a separate pull request, because #228 was supposed to be only a style-cleaned version of the original #160. This is a functional change from that PR.

What has been done

  • If cassette is new, then "strict" mode behaves like "once" mode

How to test

  • setMode('strict')
  • Insert a non-existent cassette
  • Trigger a request (curl, stream wrapper, etc)
  • Fail!

Todo

  • N/A

Notes

  • N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants