[ProxyManager] fix tests

This commit is contained in:
Nicolas Grekas 2018-09-01 19:22:02 +02:00
parent 39bad6871f
commit 3d5629a6cf
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,7 @@ class SunnyInterface_1eff735 implements \ProxyManager\Proxy\VirtualProxyInterfac
{
static $reflection;
$reflection = $reflection ?: $reflection = new \ReflectionClass(__CLASS__);
$reflection = $reflection ?? $reflection = new \ReflectionClass(__CLASS__);
$instance = $reflection->newInstanceWithoutConstructor();
$instance->initializer1eff735 = $initializer;
@ -61,7 +61,7 @@ class SunnyInterface_1eff735 implements \ProxyManager\Proxy\VirtualProxyInterfac
static $reflection;
if (! $this->valueHolder1eff735) {
$reflection = $reflection ?: new \ReflectionClass(__CLASS__);
$reflection = $reflection ?? new \ReflectionClass(__CLASS__);
$this->valueHolder1eff735 = $reflection->newInstanceWithoutConstructor();
}
}

View File

@ -156,6 +156,7 @@ EOPHP;
$implem = preg_replace('#\n /\*\*.*?\*/#s', '', $implem);
$implem = str_replace('getWrappedValueHolderValue() : ?object', 'getWrappedValueHolderValue()', $implem);
$implem = str_replace("array(\n \n );", "[\n \n ];", $implem);
$implem = str_replace('$reflection ?: $reflection', '$reflection ?? $reflection', $implem);
$this->assertStringEqualsFile(__DIR__.'/Fixtures/proxy-implem.php', $implem);
$this->assertStringEqualsFile(__DIR__.'/Fixtures/proxy-factory.php', $factory);