1 views_plugin_style_base.test ViewsPluginStyleTestBase::storeViewPreview($output)

Stores a view output in the elements.

File

core/modules/views/tests/styles/views_plugin_style_base.test, line 24
Definition of ViewsPluginStyleTestBase.

Class

ViewsPluginStyleTestBase
Provides a base foundation for testing style plugins.

Code

function storeViewPreview($output) {
  $htmlDom = new DOMDocument();
  @$htmlDom->loadHTML($output);
  if ($htmlDom) {
    // It's much easier to work with simplexml than DOM, luckily enough we can
    // import our DOM tree.
    $this->elements = simplexml_import_dom($htmlDom);
  }
}