'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);
$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 header text still appears.'
);
$view->
destroy();
// Hide the header on empty results.
$item =
$view->
getHandler('default', 'header', 'area'
);
$item['empty'
] = FALSE;
$view->
setHandler('default', 'header', 'area',
$item);