Definition of ViewsPluginStyleTestBase.
<?php /** * @file * Definition of ViewsPluginStyleTestBase. */ require_once BACKDROP_ROOT . '/core/modules/views/tests/views_query.test'; /** * Provides a base foundation for testing style plugins. */ abstract class ViewsPluginStyleTestBase extends ViewsSqlTest { /** * Stores the SimpleXML representation of the output. * * @var SimpleXMLElement */ protected $elements; /** * Stores a view output in the elements. */ 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); } } }