-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add resetOption method #375
Conversation
Thank you for your contribution! Can you please fix StyleCI errors, add a test case for this new method and add a little documentation on how to use it in the README.md file? |
README.md
Outdated
@@ -80,6 +80,17 @@ $snappy->setOption('toc', true); | |||
$snappy->setOption('cache-dir', '/path/to/cache/dir'); | |||
``` | |||
|
|||
### Reset options | |||
Options can be reset to their initial values with `resetOption()` method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options can be reset to their initial values with `resetOption()` method. | |
Options can be reset to their initial values with `resetOptions()` method. |
$media->setOption('disable-javascript', true); | ||
$media->setOption('no-background', true); | ||
|
||
$media->resetOptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you assert that options has been set before calling resetOptions
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting option is already tested with testSetOption()
method. I don't know we should test it here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
14869c4
to
ac05bbc
Compare
No description provided.