From 4545c5a6fed67fd0c7de575e64ff90547fce2773 Mon Sep 17 00:00:00 2001 From: matlec Date: Mon, 8 Sep 2025 14:50:11 +0200 Subject: [PATCH] =?UTF-8?q?[Console]=20Mention=20how=20to=20test=20a=20mul?= =?UTF-8?q?tiline=20question=E2=80=99s=20answer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/console/helpers/questionhelper.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/console/helpers/questionhelper.rst b/components/console/helpers/questionhelper.rst index 3dc97d5c0d3..5a07d19172a 100644 --- a/components/console/helpers/questionhelper.rst +++ b/components/console/helpers/questionhelper.rst @@ -545,6 +545,14 @@ from the command line, you need to set the inputs that the command expects:: // additional input saying "yes" will work $commandTester->setInputs(['yes']); + // Answers to multiline questions need to be suffixed by + // an end-of-transmission control character + $commandTester->setInputs([<<execute(['command' => $command->getName()]); // $this->assertRegExp('/.../', $commandTester->getDisplay());