DrupalDriver
DrupalDriver copied to clipboard
Boolean fields in D8
It would be nice to do
Given an "article" content:
| title | promote |
| test | Yes |
instead of
Given an "article" content:
| title | promote |
| test | 1 |
Using numeric values for booleans does not seem good BDD. #44 seems to address the issue for D7; looks like we need a BooleanHandler for D8.
My suggestion is to try to use the field's 'off_label' and 'on_label' settings; if that fails then try true/false, 0/1, one/off, yes/no. If the value does not match any of these, throw an exception.
Doing this in a translation-sensitive way will be the clever part.