'description_html' => $method->getDocComment() ? \CRM_Admin_Page_APIExplorer::formatDocBlock($method->getDocComment()) : '',
'fields' => array(),
'class' => 'Civi\Core\Event\GenericHookEvent',
+ 'stub' => $method,
);
foreach ($method->getParameters() as $parameter) {
$this->assertFalse($eventDef['fields']['domainID']['ref']);
$this->assertEquals('&$settingsMetaData, $domainID, $profile', $eventDef['signature']);
$this->assertTrue($inspector->validate($eventDef));
+ $this->assertTrue($eventDef['stub'] instanceof \ReflectionMethod);
+ $this->assertTrue($eventDef['stub']->isStatic());
}
public function testGetAll() {
foreach ($all as $name => $eventDef) {
$this->assertEquals($name, $eventDef['name']);
$this->assertTrue($inspector->validate($eventDef));
+ if (isset($eventDef['stub'])) {
+ $this->assertTrue($eventDef['stub'] instanceof \ReflectionMethod);
+ $this->assertTrue($eventDef['stub']->isStatic());
+ }
}
}