Skip to content

Commit ebb34b8

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Console] Document CommandTester::assertCommandIsSuccessful() usage
2 parents 9ad474e + 5287a2e commit ebb34b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

console.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ console::
384384
// e.g: '--some-option' => 'option_value',
385385
]);
386386

387+
$commandTester->assertCommandIsSuccessful();
388+
387389
// the output of the command in the console
388390
$output = $commandTester->getDisplay();
389391
$this->assertStringContainsString('Username: Wouter', $output);
@@ -400,6 +402,10 @@ call ``setAutoExit(false)`` on it to get the command result in ``CommandTester``
400402
The ``setAutoExit()`` method for single-command applications was introduced
401403
in Symfony 5.2.
402404

405+
.. versionadded:: 5.4
406+
407+
The ``assertCommandIsSuccessful()`` method was introduced in Symfony 5.4.
408+
403409
.. tip::
404410

405411
You can also test a whole console application by using

0 commit comments

Comments
 (0)