Skip to content

Commit eda5a2d

Browse files
committed
Fix e2e test
1 parent f9a751b commit eda5a2d

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

e2e/e2eTestRunner.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Rector\Console\Formatter\ColorConsoleDiffFormatter;
88
use Rector\Console\Formatter\ConsoleDiffer;
99
use Rector\Console\Style\SymfonyStyleFactory;
10+
use Rector\Differ\DefaultDiffer;
1011
use Rector\Util\Reflection\PrivatesAccessor;
1112
use Symfony\Component\Console\Command\Command;
1213

@@ -62,8 +63,9 @@
6263
}
6364

6465
// print color diff, to make easy find the differences
65-
$consoleDiffer = new ConsoleDiffer(new ColorConsoleDiffFormatter());
66-
$diff = $consoleDiffer->diff($output, $expectedOutput);
66+
$defaultDiffer = new DefaultDiffer();
67+
$colorConsoleDiffFormatter = new ColorConsoleDiffFormatter();
68+
$diff = $colorConsoleDiffFormatter->format($consoleDiffer->diff($output, $expectedOutput));
6769
$symfonyStyle->writeln($diff);
6870

6971
exit(Command::FAILURE);

e2e/e2eTestRunnerWithCache.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Rector\Console\Formatter\ColorConsoleDiffFormatter;
88
use Rector\Console\Formatter\ConsoleDiffer;
99
use Rector\Console\Style\SymfonyStyleFactory;
10+
use Rector\Differ\DefaultDiffer;
1011
use Rector\Util\Reflection\PrivatesAccessor;
1112
use Symfony\Component\Console\Command\Command;
1213

@@ -40,8 +41,9 @@
4041
}
4142

4243
// print color diff, to make easy find the differences
43-
$consoleDiffer = new ConsoleDiffer(new ColorConsoleDiffFormatter());
44-
$diff = $consoleDiffer->diff($output, $expectedOutput);
44+
$defaultDiffer = new DefaultDiffer();
45+
$colorConsoleDiffFormatter = new ColorConsoleDiffFormatter();
46+
$diff = $colorConsoleDiffFormatter->format($consoleDiffer->diff($output, $expectedOutput));
4547
$symfonyStyle->writeln($diff);
4648

4749
exit(Command::FAILURE);

0 commit comments

Comments
 (0)