$this->
assertStringEqualsFile(__DIR__.'/Fixtures/proxy-factory.php',
$factory);
eval(preg_replace('/^<\?php/', '',
$implem));
$factory =
require __DIR__.'/Fixtures/proxy-factory.php';
$foo =
$factory->
getFooService();
$this->
assertInstanceof($factory->proxyClass,
$foo);
$this->
assertInstanceof(DummyInterface::
class,
$foo);
$this->
assertInstanceof(SunnyInterface::
class,
$foo);
$this->
assertNotInstanceof(DummyClass::
class,
$foo);
$this->
assertSame($foo,
$foo->
dummy());
$foo->dynamicProp = 123;
$this->
assertSame(123, @
$foo->dynamicProp
);
} public static function getProxyCandidates(): array
{ $definitions =
[ [new Definition(__CLASS__
), true
],
[new Definition('stdClass'
), true
],
[new Definition(DumperInterface::
class), true
],
[