Skip to content

Commit 3d5629a

Browse files
[ProxyManager] fix tests
1 parent 39bad68 commit 3d5629a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/Fixtures/proxy-implem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function staticProxyConstructor($initializer)
4848
{
4949
static $reflection;
5050

51-
$reflection = $reflection ?: $reflection = new \ReflectionClass(__CLASS__);
51+
$reflection = $reflection ?? $reflection = new \ReflectionClass(__CLASS__);
5252
$instance = $reflection->newInstanceWithoutConstructor();
5353

5454
$instance->initializer1eff735 = $initializer;
@@ -61,7 +61,7 @@ public function __construct()
6161
static $reflection;
6262

6363
if (! $this->valueHolder1eff735) {
64-
$reflection = $reflection ?: new \ReflectionClass(__CLASS__);
64+
$reflection = $reflection ?? new \ReflectionClass(__CLASS__);
6565
$this->valueHolder1eff735 = $reflection->newInstanceWithoutConstructor();
6666
}
6767
}

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ protected function createProxy(\$class, \Closure \$factory)
156156
$implem = preg_replace('#\n /\*\*.*?\*/#s', '', $implem);
157157
$implem = str_replace('getWrappedValueHolderValue() : ?object', 'getWrappedValueHolderValue()', $implem);
158158
$implem = str_replace("array(\n \n );", "[\n \n ];", $implem);
159+
$implem = str_replace('$reflection ?: $reflection', '$reflection ?? $reflection', $implem);
159160
$this->assertStringEqualsFile(__DIR__.'/Fixtures/proxy-implem.php', $implem);
160161
$this->assertStringEqualsFile(__DIR__.'/Fixtures/proxy-factory.php', $factory);
161162

0 commit comments

Comments
 (0)