3 namespace Drupal\Tests\views\Kernel\Plugin;
5 use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
9 * Tests some general style plugin related functionality.
11 abstract class StyleTestBase extends ViewsKernelTestBase {
14 * Stores the SimpleXML representation of the output.
16 * @var \SimpleXMLElement
21 * Stores a view output in the elements.
23 public function storeViewPreview($output) {
25 $htmlDom = $html5->loadHTML('<html><body>' . $output . '</body></html>');
27 // It's much easier to work with simplexml than DOM, luckily enough
28 // we can just simply import our DOM tree.
29 $this->elements = simplexml_import_dom($htmlDom);