From 0d654277e75af944705c8b5c822d51103ef0cb4f Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Mon, 26 Jul 2021 19:00:40 +0200 Subject: [PATCH] Add strict mode to string comparisons for files --- src/Context/ThenStepDefinitions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Context/ThenStepDefinitions.php b/src/Context/ThenStepDefinitions.php index dc0d7ceb..792cf571 100644 --- a/src/Context/ThenStepDefinitions.php +++ b/src/Context/ThenStepDefinitions.php @@ -186,9 +186,9 @@ public function then_stdout_stderr_should_be_a_specific_version_string( $stream, } /** - * @Then /^the (.+) (file|directory) should (exist|not exist|be:|contain:|not contain:)$/ + * @Then /^the (.+) (file|directory) should( strictly)? (exist|not exist|be:|contain:|not contain:)$/ */ - public function then_a_specific_file_folder_should_exist( $path, $type, $action, $expected = null ) { + public function then_a_specific_file_folder_should_exist( $path, $type, $strictly, $action, $expected = null ) { $path = $this->replace_variables( $path ); // If it's a relative path, make it relative to the current test dir. @@ -235,7 +235,7 @@ public function then_a_specific_file_folder_should_exist( $path, $type, $action, } $contents = implode( PHP_EOL, $files ); } - $this->check_string( $contents, $expected, $action ); + $this->check_string( $contents, $expected, $action, false, (bool) $strictly ); } }