diff --git a/core/modules/views/src/Tests/Plugin/StyleTest.php b/core/modules/views/src/Tests/Plugin/StyleTest.php index 712d730..efbba4b 100644 --- a/core/modules/views/src/Tests/Plugin/StyleTest.php +++ b/core/modules/views/src/Tests/Plugin/StyleTest.php @@ -286,9 +286,9 @@ function testCustomRowClasses() { /** * Tests the custom element type for group titles. */ - public function testCustomElementTitle{ + public function testCustomElementTitle() { $style_plugins = array('default', 'grid', 'table', 'html_list'); - $view = views_get_view('test_view'); + $view = Views::getView('test_view'); foreach ($style_plugins as $plugin) { $view->initDisplay(); @@ -302,7 +302,8 @@ public function testCustomElementTitle{ $view->initStyle(); $output = $view->preview(); - $this->drupalSetContent(drupal_render($output)); + $markup = \Drupal::service('renderer')->renderRoot($output); + $this->storeViewPreview($markup); $elements = $this->xpath('//h6'); $this->assertEqual(count($elements), 5, format_string('Custom element tag found for @plugin plugin', array('@plugin' => $plugin)));