-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw exception if invalid filename is provided #379
Conversation
Codecov Report
@@ Coverage Diff @@
## master #379 +/- ##
============================================
+ Coverage 92.11% 92.14% +0.03%
- Complexity 760 763 +3
============================================
Files 21 21
Lines 1762 1770 +8
============================================
+ Hits 1623 1631 +8
Misses 139 139
Continue to review full report at Codecov.
|
@datagutten Hiya! Sorry for the long wait, but we're finally trying to get through the list of open PRs. We're currently planning two triage sessions for Requests 2.0 and would like to invite you to join us in one or both of these sessions to talk us through the PR and discuss it. The triage sessions are currently planned for:
Would you be available to join us during those times on one of those days ? |
|
* Move silence operator to the function call it applies to and ignore the CS error. * Spacing around strict equals comparison operators and other minor CS fixes. * Use the PHPUnit `expectException...()` methods. * Update the expected exception message to be in-line with what was in the docblock as the messages from cURL and fsockopen differ.
* The `testStreamToNonWritableFile()` already tested another aspect of trying to write a data stream to an unwritable file, so had to be adjusted to account for the new exception. * Minor tweak to the `testStreamToInvalidFile()` expected exception message as this can vary slightly across PHP versions. Includes adding a docblock to both tests to clarify the difference between the tests.
Added a second commit with minor tweaks to the test and adjustment to an existing test to allow for the exception. This should now be good to go. |
Throw an exception if an invalid path is provided in the filename option.
Before this change, the script will continue and try to write and close a file pointer which does not exist.