/**
* Assert a filter only match the given event types
*
* @param EventFilter $filter
* @param array $matchedTypes An array of matched event types
*/
protected function assertFilterMatch(EventFilter $filter, $matchedTypes)
{
foreach ($this->allEventTypes as $type) {
$event = new Event($this->factory, $this->getNodeTypeManager());
$event->setType($type);
$mustAccept = in_array($type, $matchedTypes);
$message = sprintf("The filter with accepted types '%s' did not match the event type '%s'", $this->eventFilter->getEventTypes(), $type);
$this->assertEquals($mustAccept, $filter->match($event), $message);
}
}