public function testGetSingleMethodAdviceForClassFromAdvisor()
{
$funcName = __FUNCTION__;
$pointcut = $this->getMock(Pointcut::class);
$pointcut->expects($this->any())->method('getClassFilter')->will($this->returnValue(TruePointFilter::getInstance()));
$pointcut->expects($this->any())->method('matches')->will($this->returnCallback(function ($point) use($funcName) {
return $point->name === $funcName;
}));
$pointcut->expects($this->any())->method('getKind')->will($this->returnValue(Pointcut::KIND_METHOD));
$advice = $this->getMock(Advice::class);
$advisor = new DefaultPointcutAdvisor($pointcut, $advice);
$advices = $this->adviceMatcher->getAdvicesForClass($this->reflectionClass, array($advisor));
$this->assertArrayHasKey(AspectContainer::METHOD_PREFIX, $advices);
$this->assertArrayHasKey($funcName, $advices[AspectContainer::METHOD_PREFIX]);
$this->assertCount(1, $advices[AspectContainer::METHOD_PREFIX]);
}