beforeDispatch() public method

Call the initialize method onl all the loaded panels.
public beforeDispatch ( Cake\Event\Event $event ) : void
$event Cake\Event\Event The beforeDispatch event.
return void
 /**
  * Test that beforeDispatch call initialize on each panel
  *
  * @return void
  */
 public function testBeforeDispatch()
 {
     $bar = new DebugBarFilter($this->events, []);
     $bar->setup();
     $this->assertNull(Log::config('debug_kit_log_panel'));
     $event = new Event('Dispatcher.beforeDispatch');
     $bar->beforeDispatch($event);
     $this->assertNotEmpty(Log::config('debug_kit_log_panel'), 'Panel attached logger.');
 }