Skip to content

Commit 85e5060

Browse files
committed
[Console] simplified tests
1 parent 88cf87e commit 85e5060

File tree

15 files changed

+29
-46
lines changed

15 files changed

+29
-46
lines changed

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure has single blank line at start when using block element
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010
$output->caution('Lorem ipsum dolor sit amet');
1111
};

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure has single blank line between titles and blocks
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010
$output->title('Title');
1111
$output->warning('Lorem ipsum dolor sit amet');
1212
$output->title('Title');

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure that all lines are aligned to the begin of the first line in a very long line block
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010
$output->block(
1111
'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',
1212
'CUSTOM',

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
// ensure long words are properly wrapped in blocks
88
return function (InputInterface $input, OutputInterface $output) {
99
$word = 'Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon';
10-
$sfStyle = new SymfonyStyleWithForcedLineLength($input, $output);
10+
$sfStyle = new SymfonyStyle($input, $output);
1111
$sfStyle->block($word, 'CUSTOM', 'fg=white;bg=blue', ' § ', false);
1212
};

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
// ensure that all lines are aligned to the begin of the first one and start with '//' in a very long line comment
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010
$output->comment(
1111
'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'
1212
);

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure has single blank line between blocks
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010
$output->warning('Warning');
1111
$output->caution('Caution');
1212
$output->error('Error');

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure has single blank line between two titles
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010
$output->title('First title');
1111
$output->title('Second title');
1212
};

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure has single blank line after any text and a title
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010

1111
$output->write('Lorem ipsum dolor sit amet');
1212
$output->title('First title');

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure has proper line ending before outputing a text block like with SymfonyStyle::listing() or SymfonyStyle::text()
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010

1111
$output->writeln('Lorem ipsum dolor sit amet');
1212
$output->listing(array(

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use Symfony\Component\Console\Input\InputInterface;
44
use Symfony\Component\Console\Output\OutputInterface;
5-
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
5+
use Symfony\Component\Console\Style\SymfonyStyle;
66

77
//Ensure has proper blank line after text block when using a block like with SymfonyStyle::success
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
9+
$output = new SymfonyStyle($input, $output);
1010

1111
$output->listing(array(
1212
'Lorem ipsum dolor sit amet',

0 commit comments

Comments
 (0)