Commit c069f5f9 authored by webchick's avatar webchick

Issue #2441583 by daffie: Upgrade Drupal\views\Tests\Plugin\StyleTestBase to HTML5

parent d64047e3
......@@ -8,6 +8,7 @@
namespace Drupal\views\Tests\Plugin;
use Drupal\views\Tests\ViewUnitTestBase;
use Masterminds\HTML5;
/**
* Tests some general style plugin related functionality.
......@@ -25,8 +26,8 @@ abstract class StyleTestBase extends ViewUnitTestBase {
* Stores a view output in the elements.
*/
function storeViewPreview($output) {
$htmlDom = new \DOMDocument();
@$htmlDom->loadHTML($output);
$html5 = new HTML5();
$htmlDom = $html5->loadHTML('<html><body>' . $output . '</body></html>');
if ($htmlDom) {
// It's much easier to work with simplexml than DOM, luckily enough
// we can just simply import our DOM tree.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment