mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Fix IN search regression from 40e2df6c3f
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\SearchEngine\Search;
|
||||
|
||||
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext;
|
||||
use Alchemy\Phrasea\SearchEngine\Elastic\Structure\Structure;
|
||||
|
||||
class QueryContextTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testFieldNarrowing()
|
||||
{
|
||||
$structure = $this->prophesize(Structure::class)->reveal();
|
||||
$available_locales = ['ab', 'cd', 'ef'];
|
||||
$context = new QueryContext($structure, $available_locales, 'fr');
|
||||
$narrowed = $context->narrowToFields(['some_field']);
|
||||
$this->assertEquals(['some_field'], $narrowed->getFields());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user