Mink
Mink copied to clipboard
selectFieldOption breaks if null value passed
I think that we should normalize the value to empty string if null
is passed.
If you need a working example, I'll provide it in the week end but it is pretty clear looking at
https://github.com/minkphp/Mink/blob/master/src/Selector/NamedSelector.php#L208
and
https://github.com/minkphp/Mink/blob/master/src/Selector/NamedSelector.php#L224
Basically, %locator%
are never replaced and so no possible way to produce a valid xpath.
If value normalization is note feasabe (as empty string could be a valid use case?) we should throw an exception.
If you all agree to replace null
with empty string (or to throw an exception), I'll be happy to make a PR.