function ViewsContentPanesTest::storeViewPreview

Stores a view output in the elements.

Parameters

string $output: The Views HTML output.

1 call to ViewsContentPanesTest::storeViewPreview()
ViewsContentPanesTest::testViewMoreLink in views_content/tests/src/views_content.test
Tests rendering a content pane with a more link.

File

views_content/tests/src/views_content.test, line 76

Class

ViewsContentPanesTest
Tests rendering views content pane displays.

Code

protected function storeViewPreview($output) {
    $html_dom = new DOMDocument();
    @$html_dom->loadHTML($output);
    if ($html_dom) {
        // 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($html_dom);
    }
}