Skip to content

Commit 207c589

Browse files
committed
wip
1 parent caf5799 commit 207c589

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/upgrade/tests/RectorTester.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Closure;
66
use PHPUnit\Framework\Assert;
77
use Rector\Application\ApplicationFileProcessor;
8-
use Rector\Bootstrap\RectorConfigsResolver;
98
use Rector\DependencyInjection\RectorContainerFactory;
109
use Rector\ValueObject\Bootstrap\BootstrapConfigs;
1110
use Rector\ValueObject\Configuration;
@@ -42,10 +41,11 @@ public function assert(Closure $test): self
4241
public function assertMatchesExpected(): self
4342
{
4443
$expected = file_get_contents(str_replace('.input.php', '.expected.php', $this->fixturePath));
45-
$expected = preg_replace('/^<\?php\n/', '', $expected);
44+
[$expected, $actual] = preg_replace('/^<\?php\s*/', '', [$expected, $this->actual]);
4645
$expected = trim($expected);
46+
$actual = trim($actual);
4747

48-
Assert::assertSame($expected, $this->actual);
48+
Assert::assertSame($expected, $actual);
4949

5050
return $this;
5151
}

0 commit comments

Comments
 (0)