Tests render functionality.
public function testRender() {
\Drupal::state()
->set('views_render.test', 0);
// Make sure that the rendering just calls the preprocess function once.
$view = views_get_view('test_view_render');
$output = $view
->preview();
drupal_render($output);
$this
->assertEqual(\Drupal::state()
->get('views_render.test'), 1);
}