/**
* It should throw a helpful exception when an annotation is not recognized.
*
* @expectedException InvalidArgumentException
* @expectedExceptionMessage Unrecognized annotation @Foobar, valid PHPBench annotations: @BeforeMethods,
*/
public function testUsefulException()
{
$hierarchy = 'test';
$reflection = new ReflectionClass();
$reflection->class = 'TestChild';
$reflection->comment = <<<EOT
/**
* @Foobar("foo")
*/
EOT;
$hierarchy = new ReflectionHierarchy();
$hierarchy->addReflectionClass($reflection);
$this->driver->getMetadataForHierarchy($hierarchy);
}