-
Notifications
You must be signed in to change notification settings - Fork 280
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
fieldValueEquals does not support multiple select #704
Comments
Maybe there is a dedicated method for working with multiselects? |
@aik099 the code of the method will work fine with multiple selects in WebAssert (the builtin step from MinkExtension will not as it cannot build an array here, but a custom step could define the array). The issue in WebAssert is only in the generated error message. |
Agreed. |
ex:
|
When I use the assert "assertFieldContains" on an element "select" with attribute "multiple", I have this error:
Notice: Array to string conversion in vendor/behat/mink/src/WebAssert.php line 678
This error correspond to the method
WebAssert::fieldValueEquals()
:$message = sprintf('The field "%s" value is "%s", but "%s" expected.', $field, $actual, $value);
$actual
is an array, not a string as for a simple select.Example:
Spec:
PHP 5.6.22
"behat/behat": "^3.0",
"behat/mink": "^1.7",
"behat/mink-extension": "^2.2",
The text was updated successfully, but these errors were encountered: