mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
[SearchEngine] Add search engine service provider unit test
This commit is contained in:
@@ -22,8 +22,7 @@ class SearchEngineServiceProvider implements ServiceProviderInterface
|
||||
{
|
||||
$app['phraseanet.SE'] = $app->share(function($app) {
|
||||
$configuration = $app['phraseanet.configuration']
|
||||
->getService($app['phraseanet.configuration']
|
||||
->getSearchEngine());
|
||||
->getService($app['phraseanet.configuration']->getSearchEngine());
|
||||
|
||||
$service = Builder::create($app, $configuration);
|
||||
|
||||
|
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Phrasea\Core\Provider;
|
||||
|
||||
require_once __DIR__ . '/../../../../PhraseanetPHPUnitAbstract.class.inc';
|
||||
|
||||
class SearchEngineServiceProvidertest extends \PhraseanetPHPUnitAbstract
|
||||
{
|
||||
public function testGetInstantiate()
|
||||
{
|
||||
self::$DI['app']->register(new SearchEngineServiceProvider());
|
||||
|
||||
$this->assertInstanceof('Alchemy\Phrasea\SearchEngine\SearchEngineInterface', self::$DI['app']['phraseanet.SE']);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user