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 missing stream wrapper functions #2979

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

p8nut
Copy link

@p8nut p8nut commented Aug 6, 2024

Issue #, if available:
#2954
Description of changes:
this implement the missing functions from the stream wrapper interface.
all of the missing function return false as the doc describe.
if needed it also throw an E_WARNING

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stobrien89
Copy link
Member

stobrien89 commented Aug 16, 2024

Hi @p8nut,

Thanks for the contribution. Would you be able to to add some unit tests covering this behavior in Test\S3\StreamWrapperTest ? Nothing fancy, just assertions on the output.

@p8nut
Copy link
Author

p8nut commented Sep 9, 2024

as asked i try to add some basic test to the code but for some reason i wasn't able to try them on my computer.
i leave them here for now and will try to validate all of them as soon as possible.

@stobrien89
Copy link
Member

@p8nut,

Thanks for adding the tests. Just two things:

  1. for the test methods, can you append ReturnsFalse to their names? e.g. testSetStreamOptionReturnsFalse.
  2. The tests are failing because the mock request is not returning a mock result. You can fix this by adding
$this->addMockResults(
  $this->client,
  [
      new Result(),
  ]
);

prior to $stream = ... in your tests.

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.

2 participants