$this->shouldNotTokenizeDefinition =
$this->
registerDefinition(ShouldNotTokenizeFieldDefinition::
class);
$this->context = Context::
createDefaultContext();
} /**
* @dataProvider validDateTerms
*/
public function testValidDateTerms(string
$dateTerm): void
{ $builder =
new EntityScoreQueryBuilder();
$pattern =
new SearchPattern( new SearchTerm($dateTerm, 1
),
'product'
);
$queries =
$builder->
buildScoreQueries($pattern,
$this->onlyDateFieldDefinition, 'test',
$this->context
);
static::
assertEquals( [ new ScoreQuery(new EqualsFilter('test.dateTime',
$dateTerm), 100
),
new ScoreQuery(new ContainsFilter('test.dateTime',
$dateTerm), 50
),
],