public function testTransformerPluginNames() { $sourceIn = ['<?php' . PHP_EOL, '/**' . PHP_EOL, ' */' . PHP_EOL, 'class Foo {' . PHP_EOL, ' var $uses = [\'Bar.Baz\'];' . PHP_EOL, '}' . PHP_EOL]; $sourceOutExpected = ['<?php' . PHP_EOL, '/**' . PHP_EOL, ' * @property Baz $Baz' . PHP_EOL, ' */' . PHP_EOL, 'class Foo {' . PHP_EOL, ' var $uses = [\'Bar.Baz\'];' . PHP_EOL, '}' . PHP_EOL]; $properties = ['uses' => function ($sym) { return $sym; }]; $tree = $this->parser->parse(join('', $sourceIn)); $this->visitor->setProperties(array_keys($properties)); $this->traverser->traverse($tree); $sourceOutActual = ClassTransformer::apply($sourceIn, $this->visitor->getClasses(), $properties); $this->assertSame($sourceOutExpected, $sourceOutActual); }