File tree 5 files changed +22
-7
lines changed
contributing/documentation
5 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -814,7 +814,7 @@ and then the groups in the group sequence are validated in order.
814
814
.. tip ::
815
815
816
816
Group sequences cannot contain the group ``Default ``, as this would create
817
- a loop. Instead, use the group ``{ClassName} `` (e.g. ``User ``) instead .
817
+ a loop. Instead, use the group ``{ClassName} `` (e.g. ``User ``).
818
818
819
819
For example, suppose you have a ``User `` class and want to validate that the
820
820
username and the password are different only if all other validation passes
Original file line number Diff line number Diff line change @@ -58,11 +58,9 @@ Creating a Pull Request
58
58
Following the example, the pull request will default to be between your
59
59
``improving_foo_and_bar `` branch and the ``symfony-docs `` ``master `` branch.
60
60
61
- .. image :: /images/docs-pull-request.png
62
- :align: center
63
-
64
61
If you have made your changes based on the 2.2 branch then you need to change
65
- the base branch to be 2.2 on the preview page:
62
+ the base branch to be 2.2 on the preview page by clicking the ``edit `` button
63
+ on the top left:
66
64
67
65
.. image :: /images/docs-pull-request-change-base.png
68
66
:align: center
Original file line number Diff line number Diff line change @@ -104,14 +104,25 @@ instead of
104
104
105
105
$command = $application->find('demo:greet');
106
106
$commandTester = new CommandTester($command);
107
- $commandTester->execute(array('command' => $command->getName()));
107
+ $commandTester->execute(
108
+ array(
109
+ 'command' => $command->getName(),
110
+ 'name' => 'Fabien',
111
+ '--yell' => true,
112
+ )
113
+ );
108
114
109
115
$this->assertRegExp('/.../', $commandTester->getDisplay());
110
116
111
117
// ...
112
118
}
113
119
}
114
120
121
+ .. note ::
122
+
123
+ In the specific case above, the ``name `` parameter and the ``--yell `` option are not
124
+ mandatory for the command to work well, but they are shown for the example.
125
+
115
126
To be able to use the fully set up service container for your console tests
116
127
you can extend your test from
117
128
:class: `Symfony\\ Bundle\\ FrameworkBundle\\ Test\\ WebTestCase `::
@@ -133,7 +144,13 @@ you can extend your test from
133
144
134
145
$command = $application->find('demo:greet');
135
146
$commandTester = new CommandTester($command);
136
- $commandTester->execute(array('command' => $command->getName()));
147
+ $commandTester->execute(
148
+ array(
149
+ 'command' => $command->getName(),
150
+ 'name' => 'Fabien',
151
+ '--yell' => true,
152
+ )
153
+ );
137
154
138
155
$this->assertRegExp('/.../', $commandTester->getDisplay());
139
156
You can’t perform that action at this time.
0 commit comments