/**
  * 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);
     }
 }
Beispiel #2
0
 /**
  * @test
  */
 public function detectLanguageFromStringUsesLParameter()
 {
     $service = new AppService($this->getConfiguration());
     $service->detectLanguageFromString('foo');
     $this->assertContains('-l', ExecRecorder::$execCommand);
 }