Skip to content

Commit e7e2c2e

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: docs(console): add caution for testing option
2 parents 49d4e10 + b07740b commit e7e2c2e

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
@@ -517,6 +517,15 @@ call ``setAutoExit(false)`` on it to get the command result in ``CommandTester``
517517
$application->setAutoExit(false);
518518

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

521530
.. note::
522531

0 commit comments

Comments
 (0)