diff options
author | Frédéric Guillot <fred@kanboard.net> | 2017-12-15 11:24:35 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2017-12-15 11:55:42 -0800 |
commit | a93b8e10f5954be0853eec693c13e84c4bd9e6f2 (patch) | |
tree | eda5de9494b819235616e8623bb3393e9cc373af /vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command | |
parent | 2c72a283f2d51034f85f4e2ca8b194d304a3c433 (diff) |
Kanboard requires at least PHP 5.6 now
Diffstat (limited to 'vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command')
19 files changed, 133 insertions, 29 deletions
diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php index 996fafb9..8fe7c077 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php @@ -2,10 +2,10 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure has single blank line at start when using block element return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->caution('Lorem ipsum dolor sit amet'); }; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php index 6634cd56..e5c700d6 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure has single blank line between titles and blocks return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->title('Title'); $output->warning('Lorem ipsum dolor sit amet'); $output->title('Title'); diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php index 4120df9c..3111873d 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure that all lines are aligned to the begin of the first line in a very long line block return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->block( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', 'CUSTOM', diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php index a2781ddb..3ed897de 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php @@ -2,12 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; -//Ensure that all lines are aligned to the begin of the first one and start with '//' in a very long line comment +// ensure long words are properly wrapped in blocks return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); - $output->comment( - 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum' - ); + $word = 'Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon'; + $sfStyle = new SymfonyStyle($input, $output); + $sfStyle->block($word, 'CUSTOM', 'fg=white;bg=blue', ' § ', false); }; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php new file mode 100644 index 00000000..8c458ae7 --- /dev/null +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php @@ -0,0 +1,13 @@ +<?php + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +// ensure that all lines are aligned to the begin of the first one and start with '//' in a very long line comment +return function (InputInterface $input, OutputInterface $output) { + $output = new SymfonyStyle($input, $output); + $output->comment( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum' + ); +}; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php new file mode 100644 index 00000000..827cbad1 --- /dev/null +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php @@ -0,0 +1,14 @@ +<?php + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +// ensure that nested tags have no effect on the color of the '//' prefix +return function (InputInterface $input, OutputInterface $output) { + $output->setDecorated(true); + $output = new SymfonyStyle($input, $output); + $output->comment( + 'Lorem ipsum dolor sit <comment>amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</comment> Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum' + ); +}; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php new file mode 100644 index 00000000..a893a48b --- /dev/null +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php @@ -0,0 +1,17 @@ +<?php + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +// ensure that block() behaves properly with a prefix and without type +return function (InputInterface $input, OutputInterface $output) { + $output = new SymfonyStyle($input, $output); + $output->block( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', + null, + null, + '$ ', + true + ); +}; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php new file mode 100644 index 00000000..68402cd4 --- /dev/null +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php @@ -0,0 +1,14 @@ +<?php + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +// ensure that block() behaves properly with a type and without prefix +return function (InputInterface $input, OutputInterface $output) { + $output = new SymfonyStyle($input, $output); + $output->block( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', + 'TEST' + ); +}; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php new file mode 100644 index 00000000..66e81796 --- /dev/null +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php @@ -0,0 +1,15 @@ +<?php + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +// ensure that block() output is properly formatted (even padding lines) +return function (InputInterface $input, OutputInterface $output) { + $output->setDecorated(true); + $output = new SymfonyStyle($input, $output); + $output->success( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', + 'TEST' + ); +}; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php new file mode 100644 index 00000000..311e6b39 --- /dev/null +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php @@ -0,0 +1,13 @@ +<?php + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +//Ensure symfony style helper methods handle trailing backslashes properly when decorating user texts +return function (InputInterface $input, OutputInterface $output) { + $output = new SymfonyStyle($input, $output); + + $output->title('Title ending with \\'); + $output->section('Section ending with \\'); +}; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php index 6004e3d6..791b626f 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure has single blank line between blocks return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->warning('Warning'); $output->caution('Caution'); $output->error('Error'); diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php index c7a08f13..99253a6c 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure has single blank line between two titles return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->title('First title'); $output->title('Second title'); }; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php index afea70c7..0c5d3fb2 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure has single blank line after any text and a title return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->write('Lorem ipsum dolor sit amet'); $output->title('First title'); diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php index d2c68a9e..96433ed5 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; -//Ensure has proper line ending before outputing a text block like with SymfonyStyle::listing() or SymfonyStyle::text() +//Ensure has proper line ending before outputting a text block like with SymfonyStyle::listing() or SymfonyStyle::text() return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->writeln('Lorem ipsum dolor sit amet'); $output->listing(array( diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php index f1d79905..8031ec9c 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure has proper blank line after text block when using a block like with SymfonyStyle::success return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->listing(array( 'Lorem ipsum dolor sit amet', diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php index cbfea734..203eb5b1 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php @@ -2,11 +2,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure questions do not output anything when input is non-interactive return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->title('Title'); $output->askHidden('Hidden question'); $output->choice('Choice question with default', array('choice1', 'choice2'), 'choice1'); diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php index 0244fd27..922ef1f9 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php @@ -2,7 +2,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Helper\TableCell; //Ensure formatting tables when using multiple headers with TableCell @@ -21,6 +21,6 @@ return function (InputInterface $input, OutputInterface $output) { array('978-0804169127', 'Divine Comedy'), ); - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->table($headers, $rows); }; diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php index 6420730f..57afdf06 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php @@ -2,10 +2,10 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; +use Symfony\Component\Console\Style\SymfonyStyle; //Ensure that all lines are aligned to the begin of the first line in a multi-line block return function (InputInterface $input, OutputInterface $output) { - $output = new SymfonyStyleWithForcedLineLength($input, $output); + $output = new SymfonyStyle($input, $output); $output->block(array('Custom block', 'Second custom block line'), 'CUSTOM', 'fg=white;bg=green', 'X ', true); }; 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 index 00000000..3c9c7440 --- /dev/null +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php @@ -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?'); +}; |