File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -183,14 +183,14 @@ instead of
183
183
184
184
To be able to use the fully set up service container for your console tests
185
185
you can extend your test from
186
- :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Test\\ WebTestCase `::
186
+ :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Test\\ KernelTestCase `::
187
187
188
188
use Symfony\Component\Console\Tester\CommandTester;
189
189
use Symfony\Bundle\FrameworkBundle\Console\Application;
190
- use Symfony\Bundle\FrameworkBundle\Test\WebTestCase ;
190
+ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase ;
191
191
use Acme\DemoBundle\Command\GreetCommand;
192
192
193
- class ListCommandTest extends WebTestCase
193
+ class ListCommandTest extends KernelTestCase
194
194
{
195
195
public function testExecute()
196
196
{
@@ -214,3 +214,12 @@ you can extend your test from
214
214
// ...
215
215
}
216
216
}
217
+
218
+ .. versionadded :: 2.5
219
+ :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Test\\ KernelTestCase ` was
220
+ extracted from :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Test\\ WebTestCase `
221
+ in Symfony 2.5, where WebTestCase was made to inherit from KernelTestCase.
222
+ The difference being that WebTestCase makes available an instance of
223
+ :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Client ` via `createClient() `,
224
+ while KernelTestCase makes available an instance of
225
+ :class: `Symfony\\ Component\\ HttpKernel\\ KernelInterface ` via `createKernel() `.
You can’t perform that action at this time.
0 commit comments