public function setUp() { if (!extension_loaded('phrasea2')) { $this->markTestSkipped('Phrasea extension is not loaded'); } parent::setUp(); }
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(); }
public static function tearDownAfterClass() { if (!self::$skipped) { $binaryFinder = new ExecutableFinder(); $searchd = $binaryFinder->find('searchd'); self::$searchd = new Process($searchd . ' --stop -c ' . self::$config); self::$searchd->run(); unlink(self::$config); } self::$skipped = self::$config = self::$searchd = null; parent::tearDownAfterClass(); }
public function setUp() { $this->markTestSkipped(); if (false === @file_get_contents('http://localhost:9200')) { $this->markTestSkipped('Unable to connect to elasticsearch.'); } parent::setUp(); /** @var Indexer $indexer */ $indexer = self::$DI['app']['elasticsearch.indexer']; // Re-index everything ob_start(); $indexer->deleteIndex(); $indexer->createIndex(); $indexer->populateIndex(); ob_end_clean(); }