$this->
assertFalse($view->display_handler->
outputIsEmpty(), 'Ensure the view output is marked as not empty.'
);
$view->
destroy();
// Add a filter, so the view result is empty.
$view->
setDisplay('default'
);
$item =
[ 'table' => 'views_test_data',
'field' => 'id',
'id' => 'id',
'value' =>
['value' => 7297
],
];
$view->
setHandler('default', 'filter', 'id',
$item);
$this->
executeView($view);
$this->
assertEmpty($view->result, 'Ensure the result of the view is empty.'
);
$this->
assertFalse($view->display_handler->
outputIsEmpty(), 'Ensure the view output is marked as not empty, because the empty text still appears.'
);
$view->
destroy();
// Remove the empty area, but mark the header area to still appear.
$view->
removeHandler('default', 'empty', 'area'
);
$item =
$view->
getHandler('default', 'header', 'area'
);
$item['empty'
] = TRUE;
$view->
setHandler('default', 'header', 'area',
$item);
$this->
executeView($view);