Verifies that an amount of nids aren't in the result.
\Drupal\views\ViewExecutable $view: An executed View.
array $not_expected_nids: An array of nids which should not be part of the resultset.
string $message: (optional) A custom message to display with the assertion.
protected function assertNotInResultSet(ViewExecutable $view, array $not_expected_nids, $message = '') {
$found_nids = array_filter($view->result, function ($row) use ($not_expected_nids) {
return in_array($row->nid, $not_expected_nids);
});
$this
->assertFalse($found_nids, $message);
}