File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -28,3 +28,16 @@ Feature: It is possible to interactively fill in a form from the CLI
2828 Options:
2929 --password
3030 """
31+
32+ Scenario : Provide invalid value
33+ When I run the command "form:color --color='invalid color'" non-interactively
34+ Then the command was not successful
35+ And the output should contain
36+ """
37+ Invalid data provided: color:
38+ ERROR: This value is not valid.
39+ """
40+ And the output should contain
41+ """
42+ There were form errors.
43+ """
Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ function (FormInterface $formField) use (&$validFormFields) {
9090 },
9191 $ form ->all ()
9292 );
93+
94+ if (!$ input ->isInteractive ()) {
95+ throw new \RuntimeException ('There were form errors. ' );
96+ }
9397 }
9498 } while (!$ form ->isValid ());
9599
You can’t perform that action at this time.
0 commit comments