public function testRequireListenableCheckAttachesToDispatcher() { $check = $this->getMock(ListenableCheckInterface::class); $this->checkRepository->registerCheck($check); $check->expects($this->once())->method('attach')->with($this->eventDispatcher); $this->exerciseDispatcher->requireListenableCheck(get_class($check)); }
/** * @param ExerciseDispatcher $dispatcher */ public function configure(ExerciseDispatcher $dispatcher) { $dispatcher->requireListenableCheck(DatabaseCheck::class); }