/** * Checks whether the configured Tika server can be reached and provides a * flash message according to the result of the check. * * @return void */ protected function checkTikaServerConnection() { if ($this->tikaService->ping()) { $this->addFlashMessage('Tika host contacted at: ' . $this->tikaService->getTikaServerUrl(), 'Your Apache Tika server has been contacted.', FlashMessage::OK); } else { $this->addFlashMessage('Could not connect ot Tika at: ' . $this->tikaService->getTikaServerUrl(), 'Unable to contact your Apache Tika server.', FlashMessage::ERROR); } }
/** * @test */ public function getTikaUrlBuildsUrlFromConfiguration() { $service = new ServerService($this->getConfiguration()); $this->assertEquals('http://localhost:9998', $service->getTikaServerUrl()); }