public function testCustomSubjectPattern()
{
$reflection = new ReflectionClass();
$reflection->class = 'Test';
$method = new ReflectionMethod();
$method->reflectionClass = $reflection;
$method->class = 'Test';
$method->name = 'foo_bar_Foo';
$reflection->methods[$method->name] = $method;
$hierarchy = new ReflectionHierarchy();
$hierarchy->addReflectionClass($reflection);
$metadata = $this->createDriver('foo_bar_')->getMetadataForHierarchy($hierarchy);
$this->assertCount(1, $metadata->getSubjects());
$this->assertArrayHasKey('foo_bar_Foo', $metadata->getSubjects());
}