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

Remove tests enforcing a DriverException for null values in setValue #86

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

stof
Copy link
Member

@stof stof commented Nov 29, 2023

The contract of the method says that the argument type is string|bool|array. Passing null does not respect the contract. So there is no reason for the driver testsuite to expect drivers to throw a DriverException for this case.

This was introduced in #78 and #79.
I caught this when updating BrowserKitDriver to make those new tests pass, when phpstan told me that the value cannot be null and so the $value === null condition was always false.

The contract of the method says that the argument type is
`string|bool|array`. Passing null does not respect the contract. So
there is no reason for the driver testsuite to expect drivers to throw a
DriverException for this case.
@stof stof merged commit e02c787 into minkphp:master Nov 29, 2023
2 checks passed
@stof stof deleted the remove_invalid_test branch November 29, 2023 10:51
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.

None yet

1 participant