Skip to content

Commit baab09a

Browse files
Add demo form to tests
1 parent 8215523 commit baab09a

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
"phpunit/phpunit": "^9.5",
4040
"symplify/easy-coding-standard": "^9.4",
4141
"symplify/coding-standard": "^9.4",
42-
"symfony/intl": "^6.1"
42+
"symfony/intl": "^5"
4343
}
4444
}

features/interactive.feature

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,34 @@ Feature: It is possible to interactively fill in a form from the CLI
379379
)
380380
"""
381381

382+
Scenario: The demo form
383+
When I run the command "form:demo" and I provide as input
384+
| Input |
385+
| Menno |
386+
| y |
387+
| Main street |
388+
| n |
389+
| test@example.com |
390+
| NL |
391+
| 2001-04-01 |
392+
And the output should contain
393+
"""
394+
Array
395+
(
396+
[name] => Menno
397+
[email] => [email protected]
398+
[country] => NL
399+
[addresses] => Array
400+
(
401+
[0] => Matthias\SymfonyConsoleForm\Tests\Form\Data\Address Object
402+
(
403+
[street] => Main street
404+
)
405+
)
406+
[dateOfBirth] => 2001-04-01T00:00:00+0000
407+
)
408+
"""
409+
382410
Scenario: Non-compound form type in interactive mode
383411
When I run the command "form:non_compound_color" and I provide as input "blue" with parameters
384412
| Parameter | Value |
@@ -418,4 +446,4 @@ Feature: It is possible to interactively fill in a form from the CLI
418446
[value] => Rue du Faubourg Saint-Honoré
419447
)
420448
)
421-
"""
449+
"""

0 commit comments

Comments
 (0)