public function setUp() { parent::setUp(); $es = ElasticSearchEngine::create(self::$DI['app']); $indexer = new Indexer($es, self::$DI['app']['monolog'], self::$DI['app']['phraseanet.appbox']); $indexer->createIndex(); $indexer->reindexAll(); }
public function setUp() { if (false === @file_get_contents('http://localhost:9200')) { $this->markTestSkipped('Unable to connect to elasticsearch.'); } parent::setUp(); $es = ElasticSearchEngine::create(self::$DI['app']); $indexer = new Indexer($es, self::$DI['app']['monolog'], self::$DI['app']['phraseanet.appbox']); $indexer->createIndex(); $indexer->reindexAll(); }