We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 00c487c + f1c84dc commit 32de18dCopy full SHA for 32de18d
features/steps/given.php
@@ -43,10 +43,12 @@ function ( $world ) {
43
);
44
45
$steps->Given(
46
- '/^an? ([^\s]+) file:$/',
47
- function ( $world, $path, PyStringNode $content ) {
+ '/^an? ([^\s]+) (file|cache file):$/',
+ function ( $world, $path, $type, PyStringNode $content ) {
48
$content = (string) $content . "\n";
49
- $full_path = $world->variables['RUN_DIR'] . "/$path";
+ $full_path = 'cache file' === $type
50
+ ? $world->variables['SUITE_CACHE_DIR'] . "/$path"
51
+ : $world->variables['RUN_DIR'] . "/$path";
52
$dir = dirname( $full_path );
53
if ( ! file_exists( $dir ) ) {
54
mkdir( $dir, 0777, true /*recursive*/ );
0 commit comments