public function testCaseAllOnMethods_RegisterHandlersForEvents($event)
{
$test = $this->getTest();
$arg1 = 'arg1';
$arg2 = 'arg2';
$callable = $test->createCallableMock();
$callable->expects($test->once())->method('__invoke')->with($arg1, $arg2);
$runtime = $this->createRuntime();
$result = call_user_func_array([$runtime, 'on' . ucfirst($event)], [$callable]);
$test->assertInstanceOf(EventListener::class, $result);
$runtime->emit($event, [$arg1, $arg2]);
}