class CriteriaParserTest extends TestCase
{ private const SECOND_LANGUAGE = 'd5da80fc94874ea988eac8abdea44e0a';
public function testAggregationWithSorting(): void
{ $aggs =
new TermsAggregation('foo', 'test', null,
new FieldSorting('abc', FieldSorting::ASCENDING
),
new TermsAggregation('foo', 'foo2'
));
$definition =
$this->
getDefinition();
/** @var CompositeAggregation $esAgg */
$esAgg =
(new CriteriaParser( new EntityDefinitionQueryHelper(),
$this->
createMock(CustomFieldService::
class),
$this->
createMock(AbstractKeyValueStorage::
class) ))->
parseAggregation($aggs,
$definition, Context::
createDefaultContext());
static::
assertInstanceOf(CompositeAggregation::
class,
$esAgg);
static::
assertSame([ 'composite' =>
[ 'sources' =>
[ [ 'foo.sorting' =>
[