Skip to content
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

Add an erroneous file for triggering failure cases #212

Merged
merged 4 commits into from
Feb 18, 2020
Merged

Add an erroneous file for triggering failure cases #212

merged 4 commits into from
Feb 18, 2020

Conversation

bizurkur
Copy link
Contributor

@bizurkur bizurkur commented Feb 18, 2020

This allows for setting up error messages for basic file actions, such as: open, read, write, truncate, tell, seek, stat, eof, and lock.

Example:

$root = vfsStream::setup();
$file = vfsStream::newErronousFile('foo.txt', ['open' => 'error message'])->at($root);

fopen($file->url(), 'w');
// error message

Closes #155

@bizurkur bizurkur requested a review from a team February 18, 2020 05:01
Copy link
Member

@mikey179 mikey179 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think overall it's good and the right way to go.

@bizurkur bizurkur merged commit 9901c04 into bovigo:master Feb 18, 2020
@bizurkur bizurkur deleted the add-erroneous-file branch March 4, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mock fopen failure
2 participants