Mink icon indicating copy to clipboard operation
Mink copied to clipboard

selectFieldOption breaks if null value passed

Open DonCallisto opened this issue 6 years ago • 0 comments

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.

DonCallisto avatar Jan 17 '19 17:01 DonCallisto