File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,8 @@ console::
384
384
// e.g: '--some-option' => 'option_value',
385
385
]);
386
386
387
+ $commandTester->assertCommandIsSuccessful();
388
+
387
389
// the output of the command in the console
388
390
$output = $commandTester->getDisplay();
389
391
$this->assertStringContainsString('Username: Wouter', $output);
@@ -400,6 +402,10 @@ call ``setAutoExit(false)`` on it to get the command result in ``CommandTester``
400
402
The ``setAutoExit() `` method for single-command applications was introduced
401
403
in Symfony 5.2.
402
404
405
+ .. versionadded :: 5.4
406
+
407
+ The ``assertCommandIsSuccessful() `` method was introduced in Symfony 5.4.
408
+
403
409
.. tip ::
404
410
405
411
You can also test a whole console application by using
You can’t perform that action at this time.
0 commit comments