materio-base-legacy/tests/styles/views_plugin_style_base.test
bachy b20b38f514 first import
Signed-off-by: bachy <git@g-u-i.net>
2013-01-09 10:53:26 +01:00

34 lines
695 B
Plaintext

<?php
/**
* @file
* Definition of ViewsPluginStyleTestBase.
*/
/**
* 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 just simply import our DOM tree.
$this->elements = simplexml_import_dom($htmlDom);
}
}
}