use Symfony\Component\VarExporter\Exception\LogicException;
use Symfony\Component\VarExporter\ProxyHelper;
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\StringMagicGetClass;
class ProxyHelperTest extends TestCase
{ /**
* @dataProvider provideExportSignature
*/
public function testExportSignature(string
$expected, \ReflectionMethod
$method) { $this->
assertSame($expected, ProxyHelper::
exportSignature($method));
} public static function provideExportSignature() { $methods =
(new \
ReflectionClass(TestForProxyHelper::
class))->
getMethods();
$source =
file(__FILE__
);
foreach ($methods as $method) { $expected =
substr($source[$method->
getStartLine() - 1
],
$method->
isAbstract() ? 13 : 4, -
(1 +
$method->
isAbstract()));
$expected =
str_replace(['.', ' . . . ', '\'$a\', \'$a\n\', "\$a\n"'
],
[' . ', '...', '\'$a\', "\$a\\\n", "\$a\n"'
],
$expected);
$expected =
str_replace('Bar', '\\'.Bar::
class,
$expected);