Skip to content

Commit b07740b

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: docs(console): add caution for testing option
2 parents 9ff5eab + ef0dc2b commit b07740b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

console.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,15 @@ call ``setAutoExit(false)`` on it to get the command result in ``CommandTester``
514514
$application->setAutoExit(false);
515515

516516
$tester = new ApplicationTester($application);
517+
518+
519+
.. caution::
520+
521+
When testing ``InputOption::VALUE_NONE`` command options, you must pass an
522+
empty value to them::
523+
524+
$commandTester = new CommandTester($command);
525+
$commandTester->execute(['--some-option' => '']);
517526

518527
.. note::
519528

0 commit comments

Comments
 (0)