Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / console / Tests / Fixtures / Style / SymfonyStyle / command / interactive_command_1.php
diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php
new file mode 100644 (file)
index 0000000..3c9c744
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+
+//Ensure that questions have the expected outputs
+return function (InputInterface $input, OutputInterface $output) {
+    $output = new SymfonyStyle($input, $output);
+    $stream = fopen('php://memory', 'r+', false);
+
+    fwrite($stream, "Foo\nBar\nBaz");
+    rewind($stream);
+    $input->setStream($stream);
+
+    $output->ask('What\'s your name?');
+    $output->ask('How are you?');
+    $output->ask('Where do you come from?');
+};