/**
* This test verifies, that we get the
* expected and defined criteria from the template.
*
* @group promotions
*/
public function testCriteria(): void
{ $template =
new PermittedAutomaticPromotions($this->salesChannel->
getId());
static::
assertEquals($this->
getExpectedFilter()->
getQueries(),
$template->
getQueries());
} private function getExpectedFilter(): MultiFilter
{ return new MultiFilter( MultiFilter::CONNECTION_AND,
[ new EqualsFilter('active', true
),
new EqualsFilter('promotion.salesChannels.salesChannelId',
$this->salesChannel->
getId()),
// yes, i know, this is not the best isolation, but its actually what we want
new ActiveDateRange(),