Tests static access check.
Drupal\views_test\Plugin\views\access\StaticTest
function testStaticAccessPlugin() {
$view = views_get_view('test_access_static');
$view
->setDisplay();
$access_plugin = $view->display_handler
->getPlugin('access');
$this
->assertFalse($access_plugin
->access($this->normal_user));
$this
->drupalGet('test_access_static');
$this
->assertResponse(403);
$display =& $view->storage
->getDisplay('default');
$display['display_options']['access']['options']['access'] = TRUE;
$access_plugin->options['access'] = TRUE;
$view
->save();
$this->container
->get('router.builder')
->rebuild();
$this
->assertTrue($access_plugin
->access($this->normal_user));
$this
->drupalGet('test_access_static');
$this
->assertResponse(200);
}