mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Use phraseanet configuration for sphinx search engine tests
This commit is contained in:
@@ -34,7 +34,17 @@ class SphinxSearchEngineTest extends SearchEngineAbstractTest
|
||||
|
||||
$app = new Application('test');
|
||||
$appbox = $app['phraseanet.appbox'];
|
||||
self::$searchEngine = new SphinxSearchEngine($app, '127.0.0.1', 9312, '127.0.0.1', 9306);
|
||||
|
||||
$configuration = $app['phraseanet.configuration']->getConfig();
|
||||
$configuration['main']['search-engine']['options'] = array(
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 9312,
|
||||
'rt_host' => '127.0.0.1',
|
||||
'rt_port' => 9306,
|
||||
);
|
||||
$app['phraseanet.configuration']->setConfig($configuration);
|
||||
|
||||
self::$searchEngine = SphinxSearchEngine::create($app, $app['phraseanet.configuration']['main']['search-engine']['options']);
|
||||
|
||||
self::$config = tempnam(sys_get_temp_dir(), 'tmp_sphinx.conf');
|
||||
$configuration = self::$searchEngine->getConfigurationPanel()->getConfiguration();
|
||||
@@ -63,7 +73,7 @@ class SphinxSearchEngineTest extends SearchEngineAbstractTest
|
||||
self::$searchd = new Process($searchd . ' -c ' . self::$config);
|
||||
self::$searchd->run();
|
||||
|
||||
self::$searchEngine = new SphinxSearchEngine($app, '127.0.0.1', 9312, '127.0.0.1', 9306);
|
||||
self::$searchEngine = SphinxSearchEngine::create($app, $app['phraseanet.configuration']['main']['search-engine']['options']);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
|
Reference in New Issue
Block a user