public function testFullyQualifiesClassInDocComment()
{
$formatString = <<<EOF
/**
* @param %s \$bar
*/
EOF;
$original = sprintf($formatString, 'Bar');
$expected = sprintf($formatString, 'Foo\\Bar');
$code = <<<EOF
<?php
namespace Foo {
\tclass Bar {}
}
namespace {
\tuse Foo\\Bar;
\t
\t{$original}
\tfunction baz(Bar \$bar) {}
}
EOF;
$ast = $this->astParser->parse($code);
$traverser = new NodeTraverser();
$traverser->addVisitor(new NameResolver());
$traverser->traverse($ast);
$actual = $ast[1]->stmts[1]->getDocComment()->getText();
$this->assertEquals($expected, $actual);
}