Skip to content

Commit 8859d44

Browse files
committed
Documented: litte tweeks to the text
1 parent 4992c86 commit 8859d44

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

documentation/_posts/2013-10-20-configuration.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,25 @@ You can customize how PHP-VCR matches requests using the configuration option. L
3737
PHP-VCR allows you to define your own request matchers as callback functions and combine them with existing ones.
3838

3939
\VCR\\VCR::configue()
40-
->addRequestMatcher('custom_matcher',function (\VCR\Request $first, \VCR\Request $second) {
41-
// custom request matching
42-
return true;
43-
})
40+
->addRequestMatcher(
41+
'custom_matcher',
42+
function (\VCR\Request $first, \VCR\Request $second) {
43+
// custom request matching
44+
return true;
45+
}
46+
)
4447
->enableRequestMatchers(array('method', 'url', 'custom_matcher'));
4548

4649
## White- and Blacklisting methods
4750

48-
In special occursions, like a dedicated test scenario, you might want to exclude (blacklisting) or especially include (whitelisting) one or more methods throughout the test execution.
49-
This can be achieved by registering the name of the methods to either the recognized Blacklist
51+
In special occasions, like a dedicated test scenario, you might want to exclude (blacklisting) or especially include (whitelisting) one or more methods throughout the test execution.
52+
This can be achieved by registering the name of the methods to either the recognized blacklist:
5053

51-
\VCR\VCR::configure()
52-
->setBlackList(array('NameOfTheSpecialMethod'));
54+
\VCR\VCR::configure()->setBlackList(array('NameOfTheSpecialMethod'));
5355

54-
or an available Whitelist
56+
or the provided whitelist:
5557

56-
VCR\VCR::configure()
57-
->setWhiteList(array('NameOfTheSpecialMethod'));
58+
VCR\VCR::configure()->setWhiteList(array('NameOfTheSpecialMethod'));
5859

59-
You certainly can use both in one setup but be aware that a method set in the whitelist rules out the same method set on the blacklist and will be processed even when added to the blacklist.
60-
Both methods (setBlacklist() and setWhiteList()) do also follow the fluent interface mentioned above.
60+
You certainly can use both in one setup, but be aware that a method set in the whitelist rules out the same method added to the blacklist and will be processed even when added to the blacklist.
61+
Both methods (setBlacklist() and setWhiteList()) do also follow the fluent interface paradigm mentioned above.

0 commit comments

Comments
 (0)