// Add a pager, initialize, and test.
$view->displayHandlers->
get('default'
)->
overrideOption('pager',
[ 'type' => 'full',
'options' =>
['items_per_page' => 10
],
]);
$view->
initPager();
$this->
assertTrue($view->
usePager());
// Test setting and getting the offset.
$rand =
rand();
$view->
setOffset($rand);
$this->
assertEquals($rand,
$view->
getOffset());
// Test the getBaseTable() method.
$expected =
[ 'views_test_data' => TRUE,
'#global' => TRUE,
];
$this->
assertSame($expected,
$view->
getBaseTables());
// Test response methods.
$this->
assertInstanceOf(Response::
class,
$view->
getResponse());
$new_response =
new Response();