$this->
assertEquals(new FormattableMarkup('The %relationship_name relationship used in %handler_type %handler is not present in the %display_name display.',
['%relationship_name' => 'uid', '%handler_type' => 'field', '%handler' => 'User: Last login', '%display_name' => 'Default'
]),
$errors['default'
][0
]);
$this->
assertEquals(new FormattableMarkup('The %relationship_name relationship used in %handler_type %handler is not present in the %display_name display.',
['%relationship_name' => 'uid', '%handler_type' => 'field', '%handler' => 'User: Created', '%display_name' => 'Default'
]),
$errors['default'
][1
]);
} /**
* Tests the outputIsEmpty method on the display.
*/
public function testOutputIsEmpty() { $view = Views::
getView('test_display_empty'
);
$this->
executeView($view);
$this->
assertNotEmpty($view->result
);
$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);