You are here

function ViewsPluginStyleTestBase::storeViewPreview in Views (for Drupal 7) 7.3

Stores a view output in the elements.

3 calls to ViewsPluginStyleTestBase::storeViewPreview()
ViewsPluginStyleMappingTest::mappedOutputHelper in tests/styles/views_plugin_style_mapping.test
Tests the mapping of fields.
ViewsPluginStyleTestCase::testCustomRowClasses in tests/styles/views_plugin_style.test
Tests custom css classes.
ViewsPluginStyleUnformattedTestCase::testDefaultRowClasses in tests/styles/views_plugin_style_unformatted.test
Take sure that the default css classes works as expected.

File

tests/styles/views_plugin_style_base.test, line 23
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 just simply import our DOM tree.
    $this->elements = simplexml_import_dom($htmlDom);
  }
}