/** * Fire file modified event. * * @param $event * @param $resource * @param $path */ public function fireEvent($event, $resource, $path) { if ($event->getCode() == Event::RESOURCE_CREATED) { $this->loadTests(); } $message = "File {$path} was " . $this->getEventName($event->getCode()); $this->command->drawLine($message); $this->command->line($message); if ($test = $this->dataRepository->isTestFile($path)) { $this->command->line('Test added to queue'); $this->dataRepository->addTestToQueue($test); return; } if ($this->queueTestSuites($path)) { return; } $this->command->line('All tests added to queue'); $this->dataRepository->queueAllTests(); }