diff --git a/tests/unit/lucatume/WPBrowser/Utils/ChromedriverInstallerTest.php b/tests/unit/lucatume/WPBrowser/Utils/ChromedriverInstallerTest.php index c8c4c2a78..bbf062cc9 100644 --- a/tests/unit/lucatume/WPBrowser/Utils/ChromedriverInstallerTest.php +++ b/tests/unit/lucatume/WPBrowser/Utils/ChromedriverInstallerTest.php @@ -272,6 +272,9 @@ public function should_throw_if_download_url_for_chrome_version_cannot_be_found_ public function should_throw_if_existing_zip_file_cannot_be_removed(): void { $this->setFunctionReturn('sys_get_temp_dir', codecept_output_dir()); + $this->setFunctionReturn('is_file', function (string $file): bool { + return preg_match('~chromedriver\\.zip$~', $file) ? true : is_file($file); + },true); $this->setFunctionReturn('unlink', function (string $file): bool { return preg_match('~chromedriver\\.zip$~', $file) ? false : unlink($file); }, true);