Skip to content

Commit 1c944b4

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: docs(console): add caution for testing option
2 parents 4c55db3 + e7e2c2e commit 1c944b4

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

533533
$tester = new ApplicationTester($application);
534+
535+
536+
.. caution::
537+
538+
When testing ``InputOption::VALUE_NONE`` command options, you must pass an
539+
empty value to them::
540+
541+
$commandTester = new CommandTester($command);
542+
$commandTester->execute(['--some-option' => '']);
534543

535544
.. note::
536545

0 commit comments

Comments
 (0)